Commit graph

102 commits

Author SHA1 Message Date
Glenn Morris
e18cc61cc9 Comment (python-mode is now separate from Python). 2009-02-03 04:13:17 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Stefan Monnier
f75501733f (python-mode): Don't impose ourselves on hippie. 2008-10-26 05:10:54 +00:00
Romain Francoise
75adb00dcf (run-python): Remove '' from sys.path. 2008-08-24 19:47:07 +00:00
Juanma Barranquero
f67b40b3d8 (python-comment-line-p, python-blank-line-p, python-skip-out,
python-check-comint-prompt): Don't use `iff' in docstrings.
2008-05-08 03:42:10 +00:00
Glenn Morris
b1fc2b5014 Switch to recommended form of GPLv3 permissions notice. 2008-05-06 07:25:26 +00:00
Stefan Monnier
0c8a412cfd (python-block-pairs): Align finally with except. 2008-05-05 07:10:25 +00:00
Glenn Morris
a3dd77f764 Dave Love <fx at gnu.org>
(python-beginning-of-statement): Loop at least once (fixes 2008-02-21 change).
2008-05-03 18:51:41 +00:00
Stefan Monnier
88bdb6c2e5 (python-mode-map): Use abbrev-table-menu.
(python-use-skeletons): Remove, unused.
(python-skeletons): Remove.  Use the abbrev table instead.
(python-mode-abbrev-table): Fix regexp; add enable-function and case-fixed.
(def-python-skeleton): Simplify.
(python-expand-template): Use the abbrev-table and abbrev-insert.
(python-abbrev-pc-hook, python-abbrev-syntax-table, python-pea-hook): Remove.
(python-mode): Don't set pre-abbrev-expand-hook.
2008-04-17 20:09:54 +00:00
Ken Manheimer
f7aa70c758 Finish pdbtrack integration cleanup, settling missing-functions
byte compiler warnings appropriately.

* progmodes/python.el (python-point): Remove this - beginning-of-line was
all that was necessary for `python-pdbtrack-overlay-arrow'.
(python-end-of-def-or-class, python-beginning-of-def-or-class)
(python-goto-initial-line): Drop these - they were only needed for
python-point.
(python-comint-output-filter-function): Use condition-case and
beginning-of-line directly, instead of python-mode.el functions
which require all sorts of baggage.
(point-safe): Unnecessary - we're using condition-case directly,
instead.
(python-execute-file): Include for python-shell, which i'm leaving
in keeping despite it being unnecessary for pdb tracking.
2008-02-22 17:49:48 +00:00
Ken Manheimer
82ede38976 Revise pdbtrack functionality to incorporate advances in python-mode.el.
(I'm doing this python.el checkin with some byte-compiler warnings.  These
warnings existed before Nick Roberts or I applied any of the pdbtrack
changes, and look very clearly like preexisting, incomplete adoption of
code from python-mode.el.  I'm going to next look at settling those
warnings, though I don't have time for a major reconciliation of the two
python-mode implementations.)

(python-pdbtrack-toggle-stack-tracking): Clarify docstring.
(python-pdbtrack-minor-mode-string): A sign indicating that pdb
tracking is happening.
(python-pdbtrack-stack-entry-regexp): Better recognize stack traces.
(python-pdbtrack-input-prompt): Better recognize PDB prompts.
(add python-pdbtrack-track-stack-file to comint-output-filter-functions):
Tracking is plugged in to all comint buffers once python.el is loaded.
(python-pdbtrack-overlay-arrow): Toggle activation of
`python-pdbtrack-minor-mode-string' in addition to the overlay arrow.
(python-pdbtrack-track-stack-file): Use new
`python-pdbtrack-get-source-buffer' for more flexible access to
debugging source files.
(python-pdbtrack-get-source-buffer): Identify debugging target
buffer according to pdb stack trace, optionally using new
`python-pdbtrack-grub-for-buffer' if file is not locally
available.
(python-pdbtrack-grub-for-buffer): Find most recent python-mode
named buffer, or having function with indicated name.
(python-shell): Remove comint-output-filter-functions hook
addition, it's being done elsewhere.  Wrap long line.
2008-02-21 22:28:13 +00:00
Chong Yidong
2bcda1d5ac Merge from Dave Love's 2008-01-20 version.
Require sym-comp.  Add Python buffer to same-window-buffer-names.
Fixup whitespaces.
(python-font-lock-keywords): Add highlighting for Python builtins.
(python-font-lock-syntactic-keywords): Rewrite.
(python-quote-syntax): Use syntax-ppss-context instead of parsing
ppss directly.
(python-mode-map): Add binding for python-find-function.
(python-calculate-indentation): Clean up the logic.
(python-beginning-of-defun): Explicitly set return value.
(python-beginning-of-statement): Stop looping if we get stuck
going backwards.
(python-next-statement): Stop looping if we somehow end up inside
a string while advancing.
(python-preoutput-continuation, python-version-checked): New vars.
(python-check-version): New function.
(run-python): Set default command to python-command instead of
python-python-command.
(run-python): Use python-check-version.  Give PYTHONPATH
precedence over data-directory in the process environment.  Load
function definitions in python process after.
(python-check-comint-prompt): New function.
(python-send-command, python-send-receive): Use it.
(python-complete-symbol, python-try-complete): Functions deleted.
Use symbol-complete instead of python-complete-symbol throughout.
(python-fill-paragraph): Further refine the fenced-string regexp.
(def-python-skeleton): Expand to the original abbrev instead if in
a comment or string.  Tweak skeletons for `if', `while', `for',
`try/except', `try/finally', `name'.
(python-pea-hook, python-abbrev-pc-hook): New functions.
(python-abbrev-syntax-table): New var.
(python-mode): Add python-pea-hook to pre-abbrev-expand-hook.  Use
symbol-completion-try-complete for hippie expansion.  Turn on font
lock unconditionally.
(python-mode-hook): Defcustom it.  No need to use make-local
variable on indent-tabs-mode in "Turn off Indent Tabs mode"
option, since it's buffer-local.
2008-02-21 17:03:47 +00:00
Nick Roberts
d550787cc9 Also require comint when loading.
(python-mode-map): Bind python-pdbtrack-toggle-stack-tracking,
Replace python-shell with run-python on menu bar,
(python-shell-map): New map.
(python-default-interpreter, python-python-command-args)
(python-jython-command-args, python-pdbtrack-do-tracking-p):
New options.
(python-which-shell, python-which-args, python-which-bufname):
New buffer local variables.
(python-file-queue, python-pdbtrack-is-tracking-p):
* progmodes/python.el (python-pdbtrack-stack-entry-regexp)
(python-pdbtrack-input-prompt, python-pdbtrack-track-range):
New constants.

Pdbtrack features:

(python-point, python-end-of-def-or-class)
(python-beginning-of-def-or-class, python-goto-initial-line)
(python-comint-output-filter-function)
(python-pdbtrack-overlay-arrow)
(python-pdbtrack-track-stack-file, python-toggle-shells)
(python-shell, python-pdbtrack-toggle-stack-tracking)
(turn-on-pdbtrack, turn-off-pdbtrack, python-sentinel):
New functions.
2008-02-20 00:18:23 +00:00
Glenn Morris
f2c6de6aed Quote all calls to "auxiliary skeleton"s to prevent infloops. 2008-01-20 04:02:15 +00:00
Glenn Morris
f2357ea13b Martin Svenson <phromo at gmail.com> (tiny change)
(python-imports): Default to "None".
2008-01-20 03:56:50 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
4e643dd23c Add 2008 to copyright years. 2008-01-07 02:11:00 +00:00
Glenn Morris
5cec305694 Remove directory part from filenames in function declarations. 2007-12-06 04:09:57 +00:00
Glenn Morris
981ed8df13 (compilation-shell-minor-mode): Declare as a function. 2007-12-05 03:32:55 +00:00
Glenn Morris
2650c1dbf9 (top-level): Don't require cl when compiling. 2007-12-02 20:04:11 +00:00
Dan Nicolaescu
e8ffb999b9 * frame.el (msdos-mouse-p):
* generic-x.el (w32-shell-name):
* files.el (msdos-long-file-names, w32-long-file-name)
(msdos-long-file-names, dired-get-filename, dired-unmark)
(dired-do-flagged-delete, dos-8+3-filename, vms-read-directory)
(view-mode-disable):
* term/mac-win.el (mac-code-convert-string, mac-coerce-ae-data)
(mac-resume-apple-event, mac-font-panel-mode)
(mac-atsu-font-face-attributes, mac-ae-set-reply-parameter)
(mac-clear-font-name-table):
* term/pc-win.el (msdos-remember-default-colors)
(w16-set-clipboard-data, w16-get-clipboard-data):
* term/w32-win.el (w32-send-sys-command, w32-select-font)
(set-message-beep):
* w32-fns.el (set-message-beep, w32-get-clipboard-data)
(w32-get-locale-info, w32-get-valid-locale-ids)
(w32-set-clipboard-data):
* help-fns.el (ad-get-advice-info):
* font-lock.el (fast-lock-after-fontify-buffer)
(fast-lock-after-unfontify-buffer, fast-lock-mode)
(lazy-lock-after-fontify-buffer)
(lazy-lock-after-unfontify-buffer, lazy-lock-mode):
* net/browse-url.el (w32-shell-execute):
* dos-fns.el (int86, msdos-long-file-names):
* dos-w32.el (default-printer-name): Declare as functions.
2007-11-21 03:06:01 +00:00
Dan Nicolaescu
6d00e226c3 * progmodes/python.el (info-lookup-maybe-add-help):
* progmodes/ps-mode.el (doc-view-minor-mode):
* mail/emacsbug.el (Info-menu, Info-goto-node):
* emulation/viper-keym.el (viper-ex)
(viper-normalize-minor-mode-map-alist, viper-set-mode-vars-for):
* emulation/viper-cmd.el (widget-type, widget-button-press)
(viper-set-hooks):
* emacs-lisp/tcover-unsafep.el (unsafep-function):
* emacs-lisp/tcover-ses.el (ses-set-curcell, ses-update-cells)
(ses-load, ses-vector-delete, ses-create-header-string)
(ses-read-cell, ses-read-symbol, ses-command-hook, ses-jump):
* emacs-lisp/gulp.el (mail-subject, mail-send): Declare as
functions.

* url-mailto.el (mail-send-and-exit):
* url-http.el (url-dav-file-attributes):
* url-file.el (ange-ftp-set-passwd, ange-ftp-copy-file-internal):
(url-generate-unique-filename): Declare as functions.
2007-11-20 07:56:02 +00:00
Stefan Monnier
c01b997152 (python-mode-abbrev-table): Use :regexp.
Merge defvar and define-abbrev-table.
(def-python-skeleton): Use :case-fixed and :enable-function.
(python-abbrev-pc-hook, python-abbrev-syntax-table, python-pea-hook): Remove.
(python-mode): Don't modify pre-abbrev-expand-hook.
2007-10-31 20:00:36 +00:00
Stefan Monnier
d720f96e93 (python-current-defun): Remove left-over assignment to `start'. 2007-10-23 21:27:20 +00:00
Miles Bader
1af74d06e5 Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-875
2007-10-09 08:52:57 +00:00
Juanma Barranquero
d56f40cb55 (python-eldoc-function): Doc fix. 2007-09-27 21:23:43 +00:00
Juanma Barranquero
2092ac41d6 (python-eldoc-function): Doc fix. 2007-09-27 11:55:06 +00:00
Glenn Morris
f4ff3e5cc0 Adam Hupp <adam at hupp.org>
(run-python): Import emacs module without waiting; prevents lockup on
error.
2007-09-24 00:12:25 +00:00
Stefan Monnier
308114ef9f Merge changes from Dave Love's v2007-Sep-10.
(python-font-lock-keywords): Update to the 2.5 version of the language.
(python-quote-syntax): Let-bind font-lock-syntactic-keywords to nil.
(python-backspace): Only behave funny in code.
(python-compilation-regexp-alist): Add PDB stack trace regexp.
(inferior-python-mode): Add PDB prompt regexp.
(python-fill-paragraph): Refine the fenced-string regexp.
(python-find-imports): Handle imports spanning several lines.
(python-mode): Add `class' to hideshow support.
2007-09-10 20:02:31 +00:00
Miles Bader
37cc095b6a Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-851
2007-08-13 13:41:28 +00:00
Glenn Morris
e7f767c25e Replace `iff' in doc-strings and comments. 2007-08-08 07:34:30 +00:00
Vinicius Jose Latorre
47968e06da Fix infinite loop in python.el 2007-08-01 00:47:25 +00:00
Miles Bader
2f12b71311 Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 75-83)

   - Update from CVS
   - Remove lisp/erc/erc-nicklist.el
   - Update some .arch-inventory files
   - Indicate that emacs--devo--0--patch-834 does not need to be applied
   - Merge from gnus--rel--5.10
   - Restore lisp/emacs-lisp/cl-loaddefs.el

 * gnus--rel--5.10  (patch 239-241)

   - Merge from emacs--devo--0
   - Update from CVS

2007-07-29  Kimit Yada  <kimitto@gmail.com>  (tiny change)

   * lisp/emacs-lisp/copyright.el (copyright-update-year, copyright-update)
   (copyright-fix-years, copyright): Correctly handle the case where
   copyright-limit is nil.

2007-07-28  Konstantin Novitsky  <knovitsk@Bear.com>  (tiny change)

   * lisp/progmodes/python.el (run-python): Fix path separator under w32.

2007-07-24  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/gnus-msg.el (gnus-summary-supersede-article)
   (gnus-summary-resend-message-edit): Add Gcc header.
   (gnus-summary-resend-bounced-mail): Ditto; search whole body for parent
   article's Message-ID; refer parent article in summary buffer.

   * lisp/gnus/message.el (message-bounce): Call mime-to-mml.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-838
2007-07-31 05:02:54 +00:00
Stefan Monnier
0b3ef4f1e5 (run-python): Fix path separator under w32. 2007-07-28 20:24:19 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
1a484753b2 Switch license to GPLv3 or later. 2007-07-25 04:29:40 +00:00
Stefan Monnier
4f7a582baa (python-which-func-length-limit): New var.
(python-which-func): New function.
(python-current-defun): Add optional `length-limit' and try to fit
computed function name to that length.
(python-mode): Hook `python-which-func' up.
2007-07-12 04:36:48 +00:00
Juanma Barranquero
36754e8e79 (python-complete-symbol): Remove redundant check. 2007-06-14 00:11:40 +00:00
Stefan Monnier
52319b0e59 (python-font-lock-keywords, python-open-block-statement-p, python-mode):
Add support for the new "with" keyword.
2007-05-10 17:39:27 +00:00
Stefan Monnier
0b480dc773 (python-font-lock-keywords, python-open-block-statement-p, python-mode):
Add support for the new "with" keyword.
2007-05-09 16:56:20 +00:00
Stefan Monnier
0f21ecf3c5 (python-end-of-block): Revert last change.
(python-end-of-statement): Make sure we move *forward*.
2007-05-09 16:53:13 +00:00
Stefan Monnier
11c4b29d3a (python-guess-indent): Check non-nullness before comparing indent against
the 2..8 interval.
2007-05-08 01:35:26 +00:00
Glenn Morris
66b08d69be Restore file pending consideration of legal issues. 2007-04-26 19:43:05 +00:00
Chong Yidong
9b71a937c3 Remove python.el due to unclear legal issues. 2007-04-24 01:52:53 +00:00
Chong Yidong
003586aae6 (python-end-of-block): Avoid looping forever if python-next-statement
fails.
2007-04-16 18:55:29 +00:00
Stefan Monnier
070f60e096 (python-mode): Skip comments when parsing. 2007-03-28 01:21:47 +00:00
Juanma Barranquero
e2411870e6 (python-default-template): Doc fix.
(python-buffer): Fix typo in docstring.
2007-03-19 15:37:15 +00:00
Stefan Monnier
86a3e45eea (python-send-command): Restart proc if necessary.
(python-proc): Simplify.
2007-03-05 19:57:03 +00:00
Stefan Monnier
fc553234b5 (python-quote-syntax): Don't bother with syntax-ppss-context.
(python-fill-paragraph): Make sure that fenced-string delimiters that
stand on their own line stay there
2007-03-01 15:07:45 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00