Commit graph

804 commits

Author SHA1 Message Date
Fabián Ezequiel Gallina 8565528794 Make python-info-continuation-line-p to check context type matches
In order for a line to be continuation of another, they must be on the
same context.

New Function:
    * python-info-ppss-context-type
2012-05-17 00:03:22 -03:00
Fabián Ezequiel Gallina 64348c3241 Implemented simple virtualenv setup via python-shell-virtualenv-path variable.
when set to a string, makes the values stored in
`python-shell-process-environment' and `python-shell-exec-path' to be
modified properly so shells are started with the specified virtualenv.

New Variables:
    * python-shell-virtualenv-path

New functions:
    * python-shell-calculate-process-environment
    * python-shell-calculate-exec-path
2012-05-17 00:03:21 -03:00
Fabián Ezequiel Gallina 1fe1b5aa84 Implemented internal python shell.
This new kind of shell is intended to be used for generic
communication related to defined configurations. The main difference
with global or dedicated shells is that these ones are attached to a
configuration, not a buffer. This means that can be used for example
to retrieve the sys.path and other stuff, without messing with user
shells.

New Variables:
    * python-shell-internal-buffer-name,

New functions:
    * python-shell-internal-get-process-name
    * run-python-internal
    * python-shell-internal-get-or-create-process
    * python-shell-internal-send-string (makes python-send-receive obsolete)
2012-05-17 00:03:21 -03:00
Fabián Ezequiel Gallina ecf24fd762 Backported triple quote syntax from Emacs 24 2012-05-17 00:03:21 -03:00
Fabián Ezequiel Gallina 33d0aec16e Make package description separator contain 3 dashes (ELPA conformance) 2012-05-17 00:03:20 -03:00
Fabián Ezequiel Gallina f2a972f356 Updated TODO 2012-05-17 00:03:20 -03:00
Fabián Ezequiel Gallina 9438f1ef3a fixed font-lock-builtin-face regexp 2012-05-17 00:03:20 -03:00
Fabián Ezequiel Gallina 82c2b0de6a Set local variable `mode-require-final-newline' to t 2012-05-17 00:03:19 -03:00
Fabián Ezequiel Gallina c61d750ea7 None, True, False, Ellipsis, __debug__, and NotImplemented now use font-lock-constant-face
Also copyright, license, credits, quit, exit are removed from
font-lock since they are added by the site module and only useful for
shell interaction and not programs.

See: http://docs.python.org/release/3.1.3/library/constants.html#constants-added-by-the-site-module
2012-05-17 00:03:19 -03:00
Fabián Ezequiel Gallina 0b7b2e512d python-info-current-defun: fixed cornercase that caused imenu to break 2012-05-17 00:03:19 -03:00
Fabián Ezequiel Gallina b7f1355986 Added package information for ELPA conformance 2012-05-17 00:03:18 -03:00
Fabián Ezequiel Gallina 15cc40b819 Fixed eldoc behavior.
* python-eldoc-setup-code: The code to get help now uses the
        inspect element. When an object doesn't have documentation and
        if it is callable it returns the signature for it. Also when
        an object does contain documentation it only returns the first
        line.

      * python-eldoc-at-point: has been simplified to just message the
        doc header of objects.

      * python-info-current-defun: was not taking into account the
        current indentation so point was always inside a defun, even
        if the indentation was less or equal than the defun above.
2012-05-17 00:03:18 -03:00
Fabián Ezequiel Gallina 9787f82961 Indentation enhancements on after-backslash
Multiline sentences beginning with "import", "from" or "return" are
indented correctly now.
2012-05-17 00:03:18 -03:00
Fabián Ezequiel Gallina f8994527d4 fixed last paren indentation logic 2012-05-17 00:03:17 -03:00
Fabián Ezequiel Gallina 65e4f7642e Fixed weird cornercase behavior in python-indent-calculate-indentation.
Doing (setq python-indent-levels '(0)) was causing the value of
python-indent-levels to not be initialized correctly on next calls to
python-indent-calculate-indentation. Using (setq python-indent-levels
(list 0)) instead does the trick but I'm not sure why.
2012-05-17 00:03:17 -03:00
Fabián Ezequiel Gallina 589cefd766 increased forward-comment COUNT variable value in all calls 2012-05-17 00:03:16 -03:00
Fabián Ezequiel Gallina 4cafacb52a docstring enhancements 2012-05-17 00:03:16 -03:00
Fabián Ezequiel Gallina 107c2439fa indentation fixes on after backslash 2012-05-17 00:03:16 -03:00
Fabián Ezequiel Gallina 9fff18585a Implemented python-nav-backward-sentence, python-nav-forward-sentence
Also small fixes to python-nav-sentence-start and
python-nav-sentence-end were added.
2012-05-17 00:03:15 -03:00
Fabián Ezequiel Gallina 3697b5314a Added python-nav-sentence-start and python-nav-sentence-end functions 2012-05-17 00:03:15 -03:00
Fabián Ezequiel Gallina c942de99c0 fixed CL related bytecompilation errors and set make-tree for imenu default 2012-05-17 00:03:14 -03:00
Fabián Ezequiel Gallina fc2dc7df02 Implemented imenu support.
New variables:
 + python-imenu-include-defun-type
 + python-imenu-make-tree
 + python-imenu-subtree-root-label
 + python-imenu-index-alist

New Functions:
 + python-imenu-tree-assoc
 + python-imenu-make-element-tree
 + python-imenu-make-tree
 + python-imenu-create-index

API changes:
 + python-info-current-defun now supports an optional argument called
 INCLUDE-TYPE.
2012-05-17 00:03:14 -03:00
Fabián Ezequiel Gallina 2d63ad564d Documentation enhancements with regards to code checking. (thanks schickm) 2012-05-17 00:03:14 -03:00
Fabián Ezequiel Gallina af5c1bebb5 Fixed python-info-current-defun for classes without bases 2012-05-17 00:03:13 -03:00
Fabián Ezequiel Gallina 74d7b6051a Fixed infinite loop on python-info-current-defun
For this python-beginning-of-defun-function has been modified to
return t or nil if a defun was found.
2012-05-17 00:03:13 -03:00
Fabián Ezequiel Gallina 053a6c726f Docstrings enhancements 2012-05-17 00:03:13 -03:00
Fabián Ezequiel Gallina 327f0e8429 Small cornercase fix to python-info-current-defun.
Returned the bad defun name when point was at the beginning of defun.
2012-05-17 00:03:12 -03:00
Fabián Ezequiel Gallina 6b4328531c Fixed python-info-current-defun to match new navigation code.
python-nav-beginning-of-defun and python-beginning-of-defun-function
now support a new extra optional argument called NODECORATORS.
2012-05-17 00:03:12 -03:00
Fabián Ezequiel Gallina 2ed294c5df Replaced references from python-beginning-of-innermost-defun to python-beginning-of-defun-function 2012-05-17 00:03:12 -03:00
Fabián Ezequiel Gallina c2cb97aec2 User customizable fill-paragraph behavior.
For this, four new variables which contain the symbol name of the
function that specifies the behavior of fill-paragraph on certain
conditions were added:

    * python-fill-comment-function: For comments
    * python-fill-string-function: For strings
    * python-fill-decorator-function: For decorators
    * python-fill-paren-function: For parens

All of these variables are safe local variables in the case the value
provided is a symbol. Out of the box, they default to these four new
functions respectively:

    * python-fill-comment
    * python-fill-string
    * python-fill-decorator
    * python-fill-paren
2012-05-17 00:03:11 -03:00
Fabián Ezequiel Gallina 0567effbae Corrected implementations for python-{beginning,end}-of-defun functions.
When point is at beginning-of-defun, end-of-defun moves to the end of
the defun, even if it contains nested defuns. When point is at any
inner defun end-of-defun moves to the end of it, if another inner
defun exists at the same level point is moved to it.

For beginning-of-defun things are funkier, it would move backwards
following nested defuns in order. This will be fixed soon.

Note: Decorators are considered part of defuns.

Removed:
    * python-use-beginning-of-innermost-defun
    * python-beginning-of-innermost-defun-regexp

Renamed:
    * python-beginning-of-defun => python-nav-beginning-of-defun
    * python-beginning-of-defun-regexp => python-nav-beginning-of-defun-regexp
2012-05-17 00:03:11 -03:00
Fabián Ezequiel Gallina c806ea6e87 New variable python-use-beginning-of-innermost-defun
Controls if beginning-of-defun function should go to outermost or
innermost defun.
2012-05-17 00:03:11 -03:00
Fabián Ezequiel Gallina f9471190dc Better indentation handling when inside parens. 2012-05-17 00:03:10 -03:00
Fabián Ezequiel Gallina 86f1889aa9 Fixed indentation issue when indenting a python-indent-dedenter from end of line 2012-05-17 00:03:10 -03:00
Fabián Ezequiel Gallina 66bbb27f8d new variables python-shell-process-environment and python-shell-exec-path
The main reason for these new variables is virtualenv support.
2012-05-17 00:03:10 -03:00
Fabián Ezequiel Gallina 30e429dd37 New variable python-shell-send-setup-max-wait
Controls the timeout for output just before sending the setup code.
2012-05-17 00:03:09 -03:00
Fabián Ezequiel Gallina e2d8d4790f Documentation enhancements 2012-05-17 00:03:09 -03:00
Fabián Ezequiel Gallina c0428ba0bd Better shell setup using the new python-shell-send-setup-codes function.
At the moment of shell setup, all the pending output is accepted so
the prompt is always displayed correctly.
2012-05-17 00:03:09 -03:00
Fabián Ezequiel Gallina 9f1537ef3e Added indentation support for continuation of dotted expressions
Expressions like these are now supported and indented correctly:

    Object.objects.exclude(foo=1)\
                  .filter(bar=2)\
                  .values_list('baz')

Also added a small fix to python-info-assignment-continuation-line-p
to check the match for the operator is not inside some paren.
2012-05-17 00:03:08 -03:00
Fabián Ezequiel Gallina c43cd8b10f Enhancements to python-indent-electric-colon.
Only de-indent line if it really closes a block.
2012-05-17 00:03:08 -03:00
Fabián Ezequiel Gallina 14a7849583 New function python-info-ppss-context
Use this function for most syntax-ppss related tasks. While in some
parts code could be longer it makes everything more readable.

This is the first step for a cleaner indentation machinery.
2012-05-17 00:03:07 -03:00
Fabián Ezequiel Gallina 099bf0104e Added commentary about installing pyreadline on system that bundles Python without readline 2012-05-17 00:03:07 -03:00
Fabián Ezequiel Gallina da3d48d7d6 Remove find-file-noselect invocation in python-shell-send-file 2012-05-17 00:03:07 -03:00
Fabián Ezequiel Gallina 2db30ac50a Use insert instead of insert-string 2012-05-17 00:03:06 -03:00
Fabián Ezequiel Gallina 62feb91565 Better non-standard shell integration support
Added python-shell-prompt-output-regexp to match the prompts
added before output in shells like iPython. With the value of
this variable the output generated for
python-shell-send-string-no-ouput is cleaned up.

Moved completion variables and bindings setup for shell to
inferior-python-mode definition.

Renamed python-shell-completion-strings-code to
python-shell-completion-string-code.

improved python-shell-completion--get-completions string
splitting.

Cleaned up some unecessary messages.

Better code sending need test for python-shell-completion-setup
python-ffap-setup and python-eldoc-setup.

Added example for iPython integration in the commentary section.
2012-05-17 00:03:06 -03:00
Fabián Ezequiel Gallina 9ce938be0b Shell integration improvements and cleanups
Removed functions python-shell-clear-latest-output and
python-shell-send-and-clear-output in favor of
python-shell-send-string-no-output.

Also python-shell-send-string now supports multiline string statements
so you won't have to worry calling python-shell-send-file again.

All this changes should make integrations with other Python shells
than standard more robust.
2012-05-17 00:03:06 -03:00
Fabián Ezequiel Gallina 73ed683681 python.el now bytecompiles without warnings 2012-05-17 00:03:05 -03:00
Fabián Ezequiel Gallina e2803784cf Implemented Skeletons after GNU/Emacs python.el
6 basic skeletons are defined: class, def, for, if, try and while.

While these skeletons are strongly based on GNU/Emacs' current
python.el a better definition macro, a generic template for
try/except/finally/else blocks and a cool menu display is included.
2012-05-17 00:03:05 -03:00
Fabián Ezequiel Gallina 67845102b2 Explain we have python-indent-electric-colon 2012-05-17 00:03:05 -03:00
Fabián Ezequiel Gallina cb42456fc6 Don't deactivate mark after indenting commands 2012-05-17 00:03:04 -03:00
Fabián Ezequiel Gallina 76eefb1fe5 Small fix to python-indent-electric-colon
Check current indentation is greater than the current calculated
indentation.
2012-05-17 00:03:04 -03:00
Fabián Ezequiel Gallina ffdb56c385 Implemented python-indent-electric-colon 2012-05-17 00:03:04 -03:00
Fabián Ezequiel Gallina 17d13b8526 Fixed indentation of multi-line function call's closing parenthesis 2012-05-17 00:03:03 -03:00
Fabián Ezequiel Gallina 24b68537c3 Make inferior-python-mode-current-file be set via convert-standard-filename 2012-05-17 00:03:03 -03:00
Fabián Ezequiel Gallina d439cda598 Enhanced python-shell-send-file function
python-shell-send-file function now can be called interactively and
will do the right thing.

Also the python code that sent the file was improved so the shell
considers the correct path when evaluating the file.

Removed the inferior-python-mode-current-temp-file variable, after
this update inferior-python-mode-current-file is enough.
2012-05-17 00:03:03 -03:00
Fabián Ezequiel Gallina 57808175eb Added commentary about auto-indentation on newlines for python-mode.el users 2012-05-17 00:03:02 -03:00
Fabián Ezequiel Gallina d818ffa870 Use convert-standard-filename to fix temp files path 2012-05-17 00:03:02 -03:00
Fabián Ezequiel Gallina d8e594dba8 Fixed highlighting for dictionary assignments 2012-05-17 00:03:02 -03:00
Fabián Ezequiel Gallina 6eb68dc25b Fixed pdb-track on Windows
make-temp-file is returning the temp file path with the wrong type of
slashes.
2012-05-17 00:03:01 -03:00
Fabián Ezequiel Gallina 534e24385b Fixed incorrect syntax highlighting for variable assignations 2012-05-17 00:03:01 -03:00
Fabián Ezequiel Gallina 14d9f80c0d Fixed indentation guess logic to never accept 0 as a possible value 2012-05-17 00:03:01 -03:00
Fabián Ezequiel Gallina 78334b439d Implemented python-eldoc-at-point (python-describe-symbol replacement) 2012-05-17 00:03:00 -03:00
Fabián Ezequiel Gallina 8b3e0e76ee Implemented python-check 2012-05-17 00:03:00 -03:00
Fabián Ezequiel Gallina 2947016aa7 Small changes to ffap support 2012-05-17 00:03:00 -03:00
Fabián Ezequiel Gallina 046428d328 Added ffap support 2012-05-17 00:02:59 -03:00
Fabián Ezequiel Gallina 1066882c6d Simplified python-eldoc-function using python-shell-send-and-clear-output 2012-05-17 00:02:59 -03:00
Fabián Ezequiel Gallina 138df81369 Implemeneted python-shell-clear-latest-output and python-shell-send-and-clear-output
Also Simplified python-shell-completion--get-completions using
python-shell-send-and-clear-output
2012-05-17 00:02:59 -03:00
Fabián Ezequiel Gallina 9e6629387d Eldoc integration is now compatible with python 3 2012-05-17 00:02:58 -03:00
Fabián Ezequiel Gallina ed0eb59464 Make shell use completion-at-point for autocompletion. 2012-05-17 00:02:58 -03:00
Fabián Ezequiel Gallina fc87f759ed Fixed called-interactively-p invocation. 2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina db1497be14 Cleaned up TODO 2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina 075a0f6194 Enhanced shell and code autocompletion.
python-shell-completion-complete-at-point and
python-completion-complete-at-point now share common code.

Also lots of fixes related to the cleanup of shell output has been
made so completion code is really robust now.
2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina 3d6913c7d1 Fixes to shell completion at point 2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina 13d914ed50 Fixed shell region sending 2012-05-17 00:02:56 -03:00
Fabián Ezequiel Gallina 4e531f7a7e Documentation fixes 2012-05-17 00:02:56 -03:00
Fabián Ezequiel Gallina 19b122e44e Do not indent at the beginning of buffer fix 2012-05-17 00:02:56 -03:00
Fabián Ezequiel Gallina 69bab1deb3 Do not indent at the beginning of buffer 2012-05-17 00:02:55 -03:00
Fabián Ezequiel Gallina df700cc99e Fixed infinite while loop in python-info-current-defun
Was caused when a beginning of defun was in the beginning of buffer
because python-beginning-of-innermost-defun never reached the real
start when (bobp)
2012-05-17 00:02:55 -03:00
Fabián Ezequiel Gallina b962ebad98 Modified autocompletion code setup
Now it is compatible with python 2.x and python 3.x
2012-05-17 00:02:54 -03:00
Fabián Ezequiel Gallina 13d1a42edb Fixed indentation inside parens when comments are around 2012-05-17 00:02:54 -03:00
Fabián Ezequiel Gallina bbac1eb8ab python-indent-guess-indent-offset improvements 2012-05-17 00:02:54 -03:00
Fabián Ezequiel Gallina 183f9296f1 Fixed backspace behavior for delete-selection-mode. 2012-05-17 00:02:53 -03:00
Fabián Ezequiel Gallina 954aa7bdb8 Enhanced python-indent-guess-indent-offset logic. 2012-05-17 00:02:53 -03:00
Fabián Ezequiel Gallina 79dafa51ba python-shell-get-or-create-process preserves current buffer. 2012-05-17 00:02:53 -03:00
Fabián Ezequiel Gallina 66b0b492bc Generalized use of python-shell-send-file with cleanup of prompts. 2012-05-17 00:02:52 -03:00
Fabián Ezequiel Gallina 6ac2041b86 Cleanup prompts when sending region to shell. 2012-05-17 00:02:52 -03:00
Fabián Ezequiel Gallina 45c138ac0f First commit. 2012-05-17 00:02:52 -03:00
Fabián Ezequiel Gallina 3b3027dc0a Added blank python.el to workaround bzr git-apply issues 2012-05-17 00:02:42 -03:00
Fabián Ezequiel Gallina d8c80081f6 Deleted lisp/progmodes/python.el as first step of the new python.el merge. 2012-05-17 00:01:30 -03:00
Leo Liu 784e7d6eeb * lisp/progmodes/python.el (python-pdbtrack-get-source-buffer): Use
compilation-message if available to find real filename.
2012-04-26 00:46:01 +08:00
Leo Liu daf75653c2 * progmodes/python.el (python-send-region): Add suffix .py 2012-04-25 23:23:19 +08:00
Leo Liu 257440aa1c * lisp/progmodes/python.el: Move hideshow setup to the end. 2012-04-24 22:58:29 +08:00
Juanma Barranquero 376cbaccd9 Remove some `toggle-read-only' warnings.
* lisp/bs.el (bs-toggle-readonly): Call `toggle-read-only' interactively.

* lisp/descr-text.el (describe-char):
  lisp/progmodes/python.el (python-describe-symbol):
  Don't call `toggle-read-only', set `buffer-read-only'.
2012-04-19 18:50:07 +02:00
Leo Liu f45f90f331 * lisp/progmodes/python.el: Trivial cleanup. 2012-04-17 03:28:57 +08:00
Nathan Weizenbaum 8f33b5f873 `python-fill-paragraph' filling fixup when font-lock is disabled
* progmodes/python.el (python-fill-paragraph): Make
python-fill-region in a multiline string work when font-lock is
disabled.

Fixes: debbugs:7018
2012-04-10 13:27:44 +02:00
Chong Yidong fb7ada5f94 Remove * characters from the front of variable docstrings. 2012-04-09 21:05:48 +08:00
Leo Liu 5eac0c026f Fix infinite loop in python-end-of-statement
http://debbugs.gnu.org/10788
2012-02-11 12:20:16 +08:00
Syver Enstad 6b25e4e27d Fix pdb path handling.
* progmodes/gud.el (pdb): Give pdb full paths, to allow setting
breakpoints in files outside current directory.

* lisp/progmodes/python.el: Require ansi-color at top-level.

Fixes: debbugs:6098
2012-01-29 15:06:54 +08:00
Glenn Morris acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert 301b181a14 Spelling fixes. 2011-12-16 22:51:13 -08:00
Juanma Barranquero fe7a3057a3 Fix typos. 2011-11-20 20:35:27 +01:00
Paul Eggert e1dbe924b5 Spelling fixes. 2011-11-19 18:29:42 -08:00
Paul Eggert c5e87d104b Spelling fixes. 2011-11-17 09:40:48 -08:00
Paul Eggert 4c36be58ca Spelling fixes. 2011-11-17 01:09:20 -08:00
Ken Manheimer 8642c2163e * python.el (python-pdbtrack-stack-entry-regexp)
(python-pdbtrack-input-prompt, python-pdbtrack-track-stack-file):
Adjust to recognize ipdb as well as regular python pdb prompts.
Adjustments shamelessly taken exactly as suggested in EmacsWiki
page: http://www.emacswiki.org/PythonProgrammingInEmacs#toc14
2011-11-16 11:37:48 -05:00
Stefan Monnier 90132c1485 * lisp/progmodes/python.el (python-beginning-of-statement): Rewrite.
Fixes: debbugs:2703
2011-11-09 10:00:32 -05:00
Chong Yidong 3199b96fc5 Fix various uses of display-buffer and pop-to-buffer
to avoid using special-display-* and same-window-* variables.

* lisp/buff-menu.el (Buffer-menu-switch-other-window): Use second arg
of display-buffer.
(Buffer-menu-2-window): Use switch-to-buffer-other-window.

* lisp/replace.el (occur-mode-goto-occurrence)
(occur-mode-display-occurrence) Use second arg of pop-to-buffer
and display-buffer.

* lisp/window.el (display-buffer-alist): Add *Python*.

* lisp/mail/reporter.el (reporter-submit-bug-report): Use second arg of
display-buffer.

* lisp/mail/sendmail.el (sendmail-user-agent-compose): Don't bind the
special-display and same-window variables.
(mail-other-window): Use switch-to-buffer-other-window.
(mail-other-frame): USe switch-to-buffer-other-frame.

* lisp/progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use
display-buffer-other-frame.
(gdb-display-gdb-buffer): Use pop-to-buffer.

* lisp/progmodes/gud.el (gud-goto-info): Use info-other-window.

* lisp/progmodes/python.el: Don't set same-window-buffer-names.

* lisp/textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer.
2011-09-10 17:15:28 -04:00
Christoph Scholtes 464cdf568e * progmodes/python.el (python-mode-map): Use correct function to
start python interpreter from menu-bar (as reported by Geert
Kloosterman).
(inferior-python-mode-map): Fix typo.
(python-shell-map): Removed.
2011-09-03 12:44:37 -06:00
Juanma Barranquero 519d22cc0e * loadhist.el (unload--set-major-mode): New function.
(unload-feature): Use it.

* progmodes/python.el (python-after-info-look): Add autoload cookie.
  (python-unload-function): New function.

Fixes: debbugs:8781 debbugs:8730
2011-06-25 19:42:18 +02:00
Dan Nicolaescu c5cde04220 Derive some programming modes from prog-mode.
* lisp/progmodes/python.el (python-mode): Derive from prog-mode.
* lisp/progmodes/ps-mode.el (ps-mode):
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/ld-script.el (ld-script-mode): Likewise.
2011-06-15 07:07:48 -07:00
Glenn Morris f86307039d * lisp/progmodes/python.el (brm-menu): Declare. 2011-05-23 20:38:35 -07:00
Stefan Monnier 4f91a8160f Don't quote lambda expressions with `quote'. 2011-05-23 14:57:17 -03:00
Glenn Morris c71a0d48f3 Merge from emacs-23; up to 2010-06-11T14:39:54Z!cyd@stupidchicken.com. 2011-05-16 19:26:56 -07:00
Juanma Barranquero ce1539b46d lisp/progmodes/python.el: Highlight keyword "nonlocal" (bug#8639). 2011-05-13 14:44:48 +02:00
Juanma Barranquero e02f48d76b lisp/progmodes/*.el: Lexical-binding cleanup. 2011-04-22 20:44:26 +02:00
Christoph Scholtes 6d0f1c9e55 * progmodes/python.el (python-default-interpreter)
(python-python-command-args, python-jython-command-args)
(python-which-shell, python-which-args, python-which-bufname)
(python-file-queue, python-comint-output-filter-function)
(python-toggle-shells, python-shell): Remove obsolete defcustoms,
variables and functions.
2011-03-30 16:44:07 -06:00
Glenn Morris 95df8112a0 Refill some long/short copyright headers. 2011-01-26 00:36:39 -08:00
Glenn Morris 73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Stefan Monnier 77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Stefan Monnier 364df1cc76 * progmodes/python.el (python-mode): Don't impose font-lock.
Fixes: debbugs:3628
2011-01-02 22:49:13 -05:00
Glenn Morris 5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Stefan Monnier 175069efeb Derive from prog-mode, use derived-mode-p, and fix up various
minor style issues in lisp/progmodes.

* lisp/progmodes/vhdl-mode.el (vhdl-write-file-hooks-init)
(vhdl-hs-minor-mode, vhdl-ps-print-init): Fix make-local-variable ->
make-local-hook.
* lisp/progmodes/sh-script.el (sh-require-final-newline): Remove.
(sh-set-shell): Don't set require-final-newline since it's already done
by prog-mode.
* lisp/progmodes/modula2.el (m2-mode): Don't make m2-end-comment-column
since we never set it.
* lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation):
Use read-string and standard prompt.
* lisp/progmodes/dcl-mode.el (dcl-mode-map): Move init into declaration.
* lisp/progmodes/meta-mode.el (meta-mode-abbrev-table): Merge init and decl.
(meta-common-mode-syntax-table): Rename from meta-mode-syntax-table.
(meta-common-mode-map): Rename from meta-mode-map.
Remove C-m binding, which is a user preference, not mode specific.
(meta-common-mode): New major mode; replace meta-common-initialization.
* lisp/progmodes/js.el (js-mode): Call syntax-propertize rather than messing
around with font-lock.
* lisp/progmodes/etags.el (select-tags-table-mode):
Derive from special-mode.
* lisp/progmodes/octave-mod.el (octave-mode):
* lisp/progmodes/gdb-mi.el (gdb-inferior-io-mode, gdb-threads-mode)
(gdb-memory-mode, gdb-disassembly-mode, gdb-breakpoints-mode)
(gdb-frames-mode, gdb-locals-mode, gdb-registers-mode):
Let define-derived-mode do its job.
* lisp/progmodes/cpp.el (cpp-edit-mode-map):
Move initialization into declaration.
(cpp-edit-mode): Use define-derived-mode.
(cpp-edit-load): Use derived-mode-p.
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/f90.el (f90-mode):
* lisp/progmodes/cfengine.el (cfengine-mode): Don't bother setting
require-final-newline since prog-mode does it already.
* lisp/progmodes/cc-cmds.el (c-update-modeline): Use match-string.
* lisp/progmodes/asm-mode.el (asm-mode-map): Fix menu setup.
* lisp/progmodes/antlr-mode.el: Require cc-mode upfront.
(antlr-mode-syntax-table, antlr-action-syntax-table): Initialize in
the declaration.
(antlr-directory-dependencies, antlr-show-makefile-rules):
Use derived-mode-p.
(antlr-language-option): Don't assume point-min==1.
(antlr-mode): Use define-derived-mode.
* lisp/progmodes/ada-mode.el: Use derived-mode-p.
(ada-mode): Use define-derived-mode.
Use hack-local-variables-hook.

* lisp/progmodes/vhdl-mode.el (vhdl-mode):
* lisp/progmodes/verilog-mode.el (verilog-mode):
* lisp/progmodes/vera-mode.el (vera-mode):
* lisp/progmodes/sql.el (sql-mode):
* lisp/progmodes/scheme.el (scheme-mode):
* lisp/progmodes/perl-mode.el (perl-mode):
* lisp/progmodes/octave-inf.el (inferior-octave-mode):
* lisp/progmodes/autoconf.el (autoconf-mode):
* lisp/progmodes/m4-mode.el (m4-mode):
* lisp/progmodes/inf-lisp.el (inferior-lisp-mode):
* lisp/progmodes/idlwave.el (idlwave-mode):
* lisp/progmodes/icon.el (icon-mode):
* lisp/progmodes/idlw-help.el (idlwave-help-mode):
* lisp/progmodes/dcl-mode.el (dcl-mode):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode):
* lisp/progmodes/ebrowse.el (ebrowse-tree-mode, ebrowse-electric-list-mode)
(ebrowse-member-mode, ebrowse-electric-position-mode):
Use define-derived-mode.

* lisp/progmodes/xscheme.el (xscheme-start)
(local-set-scheme-interaction-buffer, scheme-interaction-mode):
* lisp/progmodes/which-func.el (which-function):
* lisp/progmodes/vhdl-mode.el (vhdl-set-style):
* lisp/progmodes/verilog-mode.el (verilog-set-compile-command)
(verilog-modify-compile-command, verilog-error-regexp-add-xemacs)
(verilog-set-define, verilog-auto-reeval-locals):
* lisp/progmodes/sql.el (sql-product-font-lock, sql-interactive-mode):
* lisp/progmodes/simula.el (simula-mode):
* lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode):
* lisp/progmodes/python.el (python-check, python-mode):
* lisp/progmodes/prolog.el (prolog-mode-variables):
* lisp/progmodes/gud.el (gud-tooltip-activate-mouse-motions):
* lisp/progmodes/ebrowse.el (ebrowse-view-file-other-frame):
* lisp/progmodes/delphi.el (delphi-mode):
* lisp/progmodes/cc-styles.el (c-setup-paragraph-variables):
* lisp/progmodes/cc-mode.el (c-basic-common-init, c-common-init)
(c-font-lock-init): Move make-local-variable to their setq.

* lisp/progmodes/xscheme.el (exit-scheme-interaction-mode)
(xscheme-enter-interaction-mode, xscheme-enter-debugger-mode)
(xscheme-debugger-mode-p, xscheme-send-string-1):
* lisp/progmodes/tcl.el (inferior-tcl-proc, tcl-current-word)
(tcl-load-file, tcl-restart-with-file):
* lisp/progmodes/ps-mode.el (ps-run-running):
* lisp/progmodes/gdb-mi.el (gud-watch, gdb-mouse-set-clear-breakpoint):
* lisp/progmodes/js.el (js--get-all-known-symbols):
* lisp/progmodes/inf-lisp.el (inferior-lisp-proc):
* lisp/progmodes/idlwave.el (idlwave-beginning-of-statement)
(idlwave-template, idlwave-update-buffer-routine-info)
(idlwave-update-current-buffer-info)
(idlwave-get-routine-info-from-buffers, idlwave-choose)
(idlwave-scan-class-info, idlwave-fix-keywords)
(idlwave-list-buffer-load-path-shadows):
* lisp/progmodes/idlw-toolbar.el (idlwave-toolbar, idlwave-toolbar-add)
(idlwave-toolbar-remove):
* lisp/progmodes/idlw-shell.el (idlwave-shell-save-and-action)
(idlwave-shell-file-name, idlwave-shell-electric-debug-all-off)
(idlwave-shell-menu-def):
* lisp/progmodes/idlw-complete-structtag.el
(idlwave-prepare-structure-tag-completion):
* lisp/progmodes/gud.el (gud-set-buffer):
* lisp/progmodes/f90.el (f90-backslash-not-special):
* lisp/progmodes/delphi.el (delphi-find-unit): Use derived-mode-p.
2010-12-10 15:00:25 -05:00
Chong Yidong 07976ae3b8 Merge changes from emacs-23 branch 2010-11-27 15:04:57 -05:00
Chong Yidong 4e2f7d2a68 Highlight top-level augmented assignments in Python (Bug#6445).
* progmodes/python.el (python-font-lock-keywords): Highlight
top-level augmented assignments (Bug#6445).
2010-11-21 12:12:44 -05:00
Chong Yidong ae3da38afc Backport fixes for Bug#5390 and Bug#5694 from trunk.
* progmodes/python.el: Add Ipython support (Bug#5390).
(python-shell-prompt-alist)
(python-shell-continuation-prompt-alist): New options.
(python--set-prompt-regexp): New function.
(inferior-python-mode, run-python, python-shell): Require
ansi-color.  Use python--set-prompt-regexp to set the comint
prompt based on the Python interpreter.
(python--prompt-regexp): New var.
(python-check-comint-prompt)
(python-comint-output-filter-function): Use it.
(run-python): Use a pipe (Bug#5694).
2010-11-21 12:04:43 -05:00
Chong Yidong 1d851570a6 Make the sys.path remove in Python mode customizable (Bug#7454).
* progmodes/python.el (run-python): Doc fix.
(python-keep-current-directory-in-path): New var (Bug#7454).
2010-11-21 11:52:05 -05:00
Glenn Morris 091af6490f python.el comment. 2010-11-20 18:19:39 -08:00
Stefan Monnier 4a47c27573 Merge from emacs-23 2010-11-17 22:54:14 -05:00
Stefan Monnier bac2de0fe3 * lisp/progmodes/python.el (run-python): Explain why we remove the current
directory from sys.path.  Suggested by Eric Hanchrow <erich@cozi.com>.
2010-11-17 10:00:16 -05:00
Glenn Morris bc1d5cdfd4 * lisp/progmodes/python.el (python-shell): Doc fix. 2010-11-09 23:46:01 -08:00
Stefan Monnier d607b96bc2 Merge from emacs-23 2010-11-09 15:07:10 -05:00
Stefan Monnier 73525e726c * lisp/progmodes/python.el (python-font-lock-syntactic-keywords):
Fix handling of backslash escapes.
(python-quote-syntax): Adjust accordingly.

Fixes: debbugs:7322
2010-11-08 13:56:10 -05:00
Glenn Morris 5ed619e0a3 Use line-end-position rather than end-of-line, etc.
* textmodes/texnfo-upd.el (texinfo-start-menu-description)
(texinfo-update-menu-region-beginning, texinfo-menu-first-node)
(texinfo-delete-existing-pointers, texinfo-find-pointer)
(texinfo-clean-up-node-line, texinfo-insert-node-lines)
(texinfo-multiple-files-update):
* textmodes/table.el (table--probe-cell-left-up)
(table--probe-cell-right-bottom):
* textmodes/picture.el (picture-tab-search):
* textmodes/page-ext.el (pages-copy-header-and-position)
(pages-directory-for-addresses):
* progmodes/vera-mode.el (vera-get-offset):
* progmodes/simula.el (simula-calculate-indent):
* progmodes/python.el (python-pdbtrack-overlay-arrow):
* progmodes/prolog.el (end-of-prolog-clause):
* progmodes/perl-mode.el (perl-calculate-indent, perl-indent-exp):
* progmodes/icon.el (indent-icon-exp):
* progmodes/etags.el (tag-re-match-p):
* progmodes/ebrowse.el (ebrowse-show-file-name-at-point):
* progmodes/ebnf2ps.el (ebnf-begin-file):
* progmodes/dcl-mode.el (dcl-back-to-indentation-1)
(dcl-save-local-variable):
* play/life.el (life-setup):
* play/gametree.el (gametree-looking-at-ply):
* nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* mail/sendmail.el (mail-mode-auto-fill):
* emacs-lisp/lisp-mode.el (calculate-lisp-indent):
* emacs-lisp/edebug.el (edebug-overlay-arrow):
* emacs-lisp/checkdoc.el (checkdoc-this-string-valid):
* woman.el (woman-parse-numeric-value, woman2-TH, woman2-SH)
(woman-tab-to-tab-stop, WoMan-warn-ignored):
* type-break.el (type-break-file-keystroke-count):
* term.el (term-replace-by-expanded-history-before-point)
(term-skip-prompt, term-extract-string):
* speedbar.el (speedbar-edit-line, speedbar-expand-line)
(speedbar-contract-line, speedbar-toggle-line-expansion)
(speedbar-parse-c-or-c++tag, speedbar-parse-tex-string)
(speedbar-buffer-revert-buffer, speedbar-highlight-one-tag-line):
* sort.el (sort-skip-fields):
* skeleton.el (skeleton-internal-list):
* simple.el (line-move-finish, line-move-to-column):
* shell.el (shell-forward-command):
* misc.el (copy-from-above-command):
* makesum.el (double-column):
* ebuff-menu.el (electric-buffer-update-highlight):
* dired.el (dired-move-to-end-of-filename):
* dframe.el (dframe-popup-kludge):
* bookmark.el (bookmark-kill-line, bookmark-bmenu-show-filenames):
* arc-mode.el (archive-get-lineno):
Use line-end-position and line-beginning-position.

* net/ange-ftp.el, progmodes/hideif.el, reposition.el:
Same, but only in comments.
2010-11-06 13:23:42 -07:00
Stefan Monnier cf38dd4298 New syntax-propertize functionality.
* lisp/font-lock.el (font-lock-syntactic-keywords): Make obsolete.
(font-lock-fontify-syntactic-keywords-region): Move handling of
font-lock-syntactically-fontified to...
(font-lock-default-fontify-region): ...here.
Let syntax-propertize-function take precedence.
(font-lock-fontify-syntactically-region): Cal syntax-propertize.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth): Skip named groups.

* lisp/emacs-lisp/syntax.el (syntax-propertize-function)
(syntax-propertize-chunk-size, syntax-propertize--done)
(syntax-propertize-extend-region-functions): New vars.
(syntax-propertize-wholelines, syntax-propertize-multiline)
(syntax-propertize--shift-groups, syntax-propertize-via-font-lock)
(syntax-propertize): New functions.
(syntax-propertize-rules): New macro.
(syntax-ppss-flush-cache): Set syntax-propertize--done.
(syntax-ppss): Call syntax-propertize.

* lisp/progmodes/ada-mode.el (ada-set-syntax-table-properties)
(ada-after-change-function, ada-initialize-syntax-table-properties)
(ada-handle-syntax-table-properties): Only define when
syntax-propertize is not available.
(ada-mode): Use syntax-propertize-function.

* lisp/progmodes/autoconf.el (autoconf-mode):
Use syntax-propertize-function.
(autoconf-font-lock-syntactic-keywords): Remove.

* lisp/progmodes/cfengine.el (cfengine-mode):
Use syntax-propertize-function.
(cfengine-font-lock-syntactic-keywords): Remove.

* lisp/progmodes/cperl-mode.el (cperl-mode): Use syntax-propertize-function.

* lisp/progmodes/fortran.el (fortran-mode): Use syntax-propertize-function.
(fortran--font-lock-syntactic-keywords): New var.
(fortran-line-length): Update syntax-propertize-function and
fortran--font-lock-syntactic-keywords.

* lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): New var;
replaces gdb-script-font-lock-syntactic-keywords.
(gdb-script-mode): Use it.

* lisp/progmodes/js.el (js--regexp-literal): Define while compiling.
(js-syntax-propertize-function): New var; replaces
js-font-lock-syntactic-keywords.
(js-mode): Use it.

* lisp/progmodes/make-mode.el (makefile-syntax-propertize-function):
New var; replaces makefile-font-lock-syntactic-keywords.
(makefile-mode): Use it.
(makefile-imake-mode): Adjust.

* lisp/progmodes/mixal-mode.el (mixal-syntax-propertize-function): New var;
replaces mixal-font-lock-syntactic-keywords.
(mixal-mode): Use it.

* lisp/progmodes/octave-mod.el (octave-syntax-propertize-sqs): New function
to replace octave-font-lock-close-quotes.
(octave-syntax-propertize-function): New function to replace
octave-font-lock-syntactic-keywords.
(octave-mode): Use it.

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to
replace perl-font-lock-syntactic-keywords.
(perl-syntax-propertize-special-constructs): New fun to replace
perl-font-lock-special-syntactic-constructs.
(perl-font-lock-syntactic-face-function): New fun.
(perl-mode): Use it.

* lisp/progmodes/python.el (python-syntax-propertize-function): New var to
replace python-font-lock-syntactic-keywords.
(python-mode): Use it.
(python-quote-syntax): Simplify and adjust to new use.

* lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re):
Define while compiling.
(ruby-here-doc-end-re, ruby-here-doc-beg-match)
(ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax)
(syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p)
(ruby-here-doc-find-end, ruby-here-doc-beg-syntax)
(ruby-here-doc-end-syntax): Only define when
syntax-propertize is not available.
(ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc):
New functions.
(ruby-in-ppss-context-p): Update to new syntax of heredocs.
(electric-indent-chars): Silence bytecompiler.
(ruby-mode): Use prog-mode, syntax-propertize-function, and
electric-indent-chars.

* lisp/progmodes/sh-script.el (sh-st-symbol): Remove.
(sh-font-lock-close-heredoc, sh-font-lock-open-heredoc): Add eol arg.
(sh-font-lock-flush-syntax-ppss-cache, sh-font-lock-here-doc): Remove.
(sh-font-lock-quoted-subshell): Assume we've already matched $(.
(sh-font-lock-paren): Set syntax-multiline.
(sh-font-lock-syntactic-keywords): Remove.
(sh-syntax-propertize-function): New function to replace it.
(sh-mode): Use it.

* lisp/progmodes/simula.el (simula-syntax-propertize-function): New var to
replace simula-font-lock-syntactic-keywords.
(simula-mode): Use it.

* lisp/progmodes/tcl.el (tcl-syntax-propertize-function): New var to
replace tcl-font-lock-syntactic-keywords.
(tcl-mode): Use it.

* lisp/progmodes/vhdl-mode.el (vhdl-mode): Use syntax-propertize-function
if available.
(vhdl-fontify-buffer): Adjust.

* lisp/textmodes/bibtex.el (bibtex-mode): Use syntax-propertize-function.

* lisp/textmodes/reftex.el (font-lock-syntactic-keywords): Don't declare
since we don't use it.

* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-function): New var to
replace sgml-font-lock-syntactic-keywords.
(sgml-mode): Use it.

* lisp/textmodes/tex-mode.el (tex-common-initialization, doctex-mode):
Use syntax-propertize-function.

* lisp/textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun
to replace texinfo-font-lock-syntactic-keywords.
(texinfo-mode): Use it.

* test/indent/octave.m: Remove some `fixindent' not needed any more.
2010-09-11 01:13:42 +02:00
Kenichi Handa 9e69cb054d merge changes in emacs-23 branch 2010-09-01 16:13:21 +09:00
Stefan Monnier f291fe60fb Use `declare' in defmacros.
* lisp/window.el (save-selected-window):
* lisp/subr.el (with-temp-file, with-temp-message, with-syntax-table):
* lisp/progmodes/python.el (def-python-skeleton):
* lisp/net/dbus.el (dbus-ignore-errors):
* lisp/jka-cmpr-hook.el (with-auto-compression-mode):
* lisp/international/mule.el (with-category-table):
* lisp/emacs-lisp/timer.el (with-timeout):
* lisp/emacs-lisp/lisp-mnt.el (lm-with-file):
* lisp/emacs-lisp/eieio.el (with-slots):
* lisp/emacs-lisp/easymenu.el (easy-menu-define):
* lisp/emacs-lisp/debug.el (debugger-env-macro):
* lisp/emacs-lisp/cl-compat.el (Multiple-value-bind, Multiple-value-setq)
(Multiple-value-call, Multiple-value-prog1):
* lisp/emacs-lisp/cl-seq.el (cl-parsing-keywords, cl-check-key)
(cl-check-test-nokey, cl-check-test, cl-check-match): Move indent and
edebug rule to definition.
* lisp/emacs-lisp/lisp-mode.el (save-selected-window)
(with-current-buffer, combine-after-change-calls)
(with-output-to-string, with-temp-file, with-temp-buffer)
(with-temp-message, with-syntax-table, read-if, eval-after-load)
(dolist, dotimes, when, unless):
* lisp/emacs-lisp/byte-run.el (inline): Remove indent rule, redundant.
2010-08-30 15:03:05 +02:00
Chong Yidong edfd00fa82 * lisp/progmodes/python.el: Add Ipython support (Bug#5390).
Based on a patch by Fabian Ezequiel Gallina.

(python-shell-prompt-alist)
(python-shell-continuation-prompt-alist): New options.
(python--set-prompt-regexp): New function.
(inferior-python-mode, run-python, python-shell): Require
ansi-color.  Use python--set-prompt-regexp to set the comint
prompt based on the Python interpreter.
(python--prompt-regexp): New var.
(python-check-comint-prompt)
(python-comint-output-filter-function): Use it.
(run-python): Use a pipe (Bug#5694).
(python-send-region): Send a different Python command if Ipython is in use.
(python-check-version): Use a Python command to find the version.
2010-08-24 16:20:21 -04:00
Chris Foote 9027027d08 * progmodes/python.el (python-block-pairs): Allow use of "finally" with "else" (Bug#3991). 2010-08-22 20:44:55 -04:00
Christoph Scholtes 4565b08e18 Add some font-locking for Python 2.7.
* lisp/progmodes/python.el (python-font-lock-keywords): Add Python 2.7
builtins (BufferError, BytesWarning, WindowsError; callables
bin, bytearray, bytes, format, memoryview, next, print; __package__).
2010-07-06 21:46:58 -07:00
Chong Yidong b8280f3930 Minor Python mode fix (Bug#5653).
* progmodes/python.el (python-pdbtrack-stack-entry-regexp): Allow
the characters _<> in the stack entry (Bug#5653).
2010-02-26 19:19:50 -05:00
Mark A. Hershberger aaef4f91fa replace references to obsolete c-subword-mode 2010-01-19 14:39:22 -05:00
Chong Yidong fd579fdca5 * progmodes/python.el (python-font-lock-keywords): Handle qualified decorators
(Bug#881).
2010-01-05 15:11:04 -07:00
Chong Yidong 8cffbb7542 * progmodes/python.el (python-symbol-completions): Remove text
properties from symbol string before calling python-send-receive.
2009-12-14 16:19:24 +00:00
Stefan Monnier 51ef56c47f * minibuffer.el (completion-at-point-functions): New var.
(completion-at-point): New command.
* indent.el (indent-for-tab-command): Handle the new `complete' behavior.
* progmodes/python.el (python-mode-map): Use completion-at-point.
(python-completion-at-point): Rename from python-partial-symbol and
adjust for use in completion-at-point-functions.
(python-mode): Setup completion-at-point for Python completion.
* emacs-lisp/lisp.el (lisp-completion-at-point): New function
extracted from lisp-complete-symbol.
(lisp-complete-symbol): Use it.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use define-derived-mode,
setup completion-at-point for Elisp completion.
(emacs-lisp-mode-map, lisp-interaction-mode-map): Use completion-at-point.
* ielm.el (ielm-map): Use completion-at-point.
(inferior-emacs-lisp-mode): Setup completion-at-point for Elisp completion.
* progmodes/sym-comp.el: Move to...
* obsolete/sym-comp.el: Move from progmodes.
2009-12-07 20:06:26 +00:00
Dan Nicolaescu 1e8780b173 * textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button):  Purecopy strings.
2009-11-06 05:16:23 +00:00
Stefan Monnier 9a5293129d * textmodes/two-column.el (2C-split):
* textmodes/texnfo-upd.el (texinfo-multi-file-included-list):
* textmodes/tex-mode.el (tex-set-buffer-directory):
* textmodes/spell.el (spell-region, spell-string):
* textmodes/reftex.el (reftex-erase-buffer):
(reftex-get-file-buffer-force, reftex-kill-temporary-buffers):
* textmodes/reftex-toc.el (reftex-toc-promote-action):
* textmodes/reftex-sel.el (reftex-get-offset, reftex-insert-docstruct)
(reftex-select-item):
* textmodes/reftex-ref.el (reftex-label-info-update)
(reftex-offer-label-menu):
* textmodes/reftex-index.el (reftex-index-change-entry)
(reftex-index-phrases-info):
* textmodes/reftex-global.el (reftex-create-tags-file)
(reftex-save-all-document-buffers, reftex-ensure-write-access):
* textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite)
(reftex-view-crossref-from-bibtex):
* textmodes/reftex-cite.el (reftex-bibtex-selection-callback)
(reftex-extract-bib-entries-from-thebibliography)
(reftex-all-used-citation-keys, reftex-create-bibtex-file):
* textmodes/refbib.el (r2b-capitalize-title):
(r2b-convert-buffer, r2b-help):
* textmodes/page-ext.el (pages-directory)
(pages-directory-goto-with-mouse):
* textmodes/bibtex.el (bibtex-validate-globally):
* textmodes/bib-mode.el (bib-capitalize-title):
* textmodes/artist.el (artist-clear-buffer, artist-system):
* progmodes/xscheme.el (global-set-scheme-interaction-buffer):
(local-set-scheme-interaction-buffer, xscheme-process-filter)
(verify-xscheme-buffer, xscheme-enter-interaction-mode)
(xscheme-enter-debugger-mode, xscheme-debugger-mode-p)
(xscheme-send-control-g-interrupt, xscheme-start-process)
(xscheme-process-sentinel, xscheme-cd):
* progmodes/verilog-mode.el (verilog-read-always-signals)
(verilog-set-define, verilog-getopt-file)
(verilog-module-inside-filename-p):
* progmodes/sh-script.el:
* progmodes/python.el (python-pdbtrack-get-source-buffer)
(python-pdbtrack-grub-for-buffer, python-execute-file):
* progmodes/octave-inf.el (inferior-octave):
* progmodes/idlwave.el (idlwave-scan-user-lib-files)
(idlwave-shell-compile-helper-routines, idlwave-set-local)
(idlwave-display-completion-list-xemacs, idlwave-list-abbrevs)
(idlwave-display-completion-list-emacs, idlwave-list-load-path-shadows)
(idlwave-completion-fontify-classes, idlwave-display-calling-sequence):
* progmodes/idlw-shell.el (idlwave-shell-examine-display-clear)
(idlwave-shell-filter, idlwave-shell-examine-highlight)
(idlwave-shell-sentinel, idlwave-shell-filter-directory)
(idlwave-shell-display-line, idlwave-shell-set-bp-in-module)
(idlwave-shell-examine-display, idlwave-shell-run-region)
(idlwave-shell-filter-bp, idlwave-shell-save-and-action)
(idlwave-shell-sources-filter, idlwave-shell-goto-next-error):
* progmodes/idlw-help.el (idlwave-help-get-special-help)
(idlwave-help-get-help-buffer):
* progmodes/gud.el (gud-basic-call, gud-find-class)
(gud-tooltip-activate-mouse-motions-if-enabled):
* progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
* progmodes/ebrowse.el (ebrowse-member-table, ebrowse-save-tree-as)
(ebrowse-view-exit-fn, ebrowse-tags-list-members-in-file)
(ebrowse-tags-next-file):
* progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate-eps)
(ebnf-eps-production-list, ebnf-begin-file, ebnf-log)
(ebnf-eps-finish-and-write):
* progmodes/cpp.el (cpp-edit-save):
* progmodes/cperl-mode.el (cperl-pod-to-manpage):
* progmodes/cc-defs.el (c-emacs-features):
* progmodes/antlr-mode.el (antlr-invalidate-context-cache)
(antlr-directory-dependencies):
* progmodes/ada-xref.el (ada-gnat-parse-gpr, ada-get-ali-file-name)
(ada-run-application, ada-find-in-src-path, ada-goto-parent)
(ada-find-any-references, ada-make-filename-from-adaname)
(ada-make-body-gnatstub):
* obsolete/rnews.el (news-list-news-groups):
* obsolete/resume.el (resume-suspend-hook,resume-write-buffer-to-file):
* obsolete/iso-acc.el (iso-acc-minibuf-setup):
* net/rcirc.el (rcirc-debug):
* net/newst-treeview.el (newsticker--treeview-list-add-item)
(newsticker--treeview-list-clear, newsticker-treeview-browse-url)
(newsticker--treeview-list-update-faces, newsticker-treeview-save)
(newsticker--treeview-item-show-text, newsticker--treeview-item-show)
(newsticker--treeview-tree-update-tag,newsticker--treeview-buffer-init)
(newsticker-treeview-show-item, newsticker--treeview-unfold-node)
(newsticker--treeview-list-clear-highlight)
(newsticker--treeview-list-update-highlight)
(newsticker--treeview-list-highlight-start)
(newsticker--treeview-tree-update-highlight)
(newsticker--treeview-get-selected-item)
(newsticker-treeview-mark-list-items-old)
(newsticker--treeview-set-current-node):
* net/newst-plainview.el (newsticker--buffer-set-uptodate):
* net/newst-backend.el (newsticker--get-news-by-funcall)
(newsticker--get-news-by-wget, newsticker--image-get)
(newsticker--image-sentinel):
* net/mairix.el (mairix-rmail-fetch-field, mairix-gnus-fetch-field):
* net/eudcb-ph.el (eudc-ph-do-request, eudc-ph-open-session):
(eudc-ph-close-session):
* net/eudc.el (eudc-save-options):
* language/thai-word.el (thai-update-word-table):
* language/japan-util.el (japanese-string-conversion):
* international/titdic-cnv.el (tsang-quick-converter)
(ziranma-converter, ctlau-converter):
* international/mule-cmds.el (describe-language-environment):
* international/ja-dic-cnv.el (skkdic-convert-okuri-ari)
(skkdic-convert-postfix, skkdic-convert-prefix):
(skkdic-convert-okuri-nasi, skkdic-convert):
* emacs-lisp/re-builder.el (reb-update-overlays):
* emacs-lisp/pp.el (pp-to-string, pp-display-expression):
* emacs-lisp/gulp.el (gulp-send-requests):
* emacs-lisp/find-gc.el (trace-call-tree):
* emacs-lisp/eieio-opt.el (eieio-browse, eieio-describe-class)
(eieio-describe-generic):
* emacs-lisp/eieio-base.el (eieio-persistent-read):
* emacs-lisp/edebug.el (edebug-outside-excursion):
* emacs-lisp/debug.el (debugger-make-xrefs):
* emacs-lisp/cust-print.el (custom-prin1-to-string):
* emacs-lisp/chart.el (chart-new-buffer):
* emacs-lisp/authors.el (authors-scan-el, authors-scan-change-log):
Use with-current-buffer.
* textmodes/artist.el (artist-system): Don't call
copy-sequence on a fresh string.
* progmodes/idlw-shell.el (easymenu setup): Use dolist.
2009-10-31 02:38:34 +00:00
Dan Nicolaescu ca0a881a35 * puresize.h (BASE_PURESIZE): Increase to 1470000.
* lread.c (Fload): Purecopy the file name when building Vpreloaded_file_list.

* textmodes/ispell.el (ispell-skip-region-alist):
* international/mule-conf.el (eight-bit):
* international/fontset.el (font-encoding-alist):
* startup.el (pure-space-overflow-message):
* simple.el (overwrite-mode-textual, overwrite-mode-binary):
* paths.el (gnus-nntp-service, rmail-spool-directory)
(term-file-prefix):
* files.el (save-some-buffers-action-alist):
* cmuscheme.el (same-window-buffer-names):
* ielm.el (same-window-buffer-names):
* shell.el (same-window-buffer-names):
* mail/sendmail.el (same-window-buffer-names):
* progmodes/inf-lisp.el (same-window-buffer-names):
* bindings.el (mode-line-client)
(mode-line-column-line-number-mode-map):
* language/tibetan.el (tibetan-precomposition-rule-regexp)
(tibetan-precomposed-regexp): Purecopy string arguments.
2009-10-30 02:00:11 +00:00
Juanma Barranquero 32226619c5 Use called-interactively-p' instead of interactive-p'. 2009-10-02 03:48:36 +00:00
Glenn Morris 5f68c1b736 Use forward-line rather than goto-line. 2009-09-01 03:18:44 +00:00
Glenn Morris d5d105e863 Use help-print-return-message rather than the now obsolete alias. 2009-08-21 07:24:26 +00:00
Martin Rudalics 3ba6d4ed56 (python-shift-left, python-shift-right):
When the mark is not active shift the current line.  (Bug#2381)
2009-02-20 16:30:53 +00:00
Stefan Monnier 865ff911f3 (python-use-skeletons): Re-add.
(def-python-skeleton): Use it.
2009-02-12 18:16:26 +00:00
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
Richard M. Stallman a8d5f40f49 (python-indent): Add safe-local-variable prop. 2006-12-04 00:33:19 +00:00
Stefan Monnier 71884b8d18 (inferior-python-mode-syntax-table): New var.
(inferior-python-mode): Use it.
2006-11-14 15:34:15 +00:00
John Wiegley 7a338befad 2006-10-22 John Wiegley <johnw@newartisans.com>
* progmodes/python.el (python-use-skeletons): python-mode was
	auto-inserting templates (for those with abbrev-mode on), not only
	by default -- *but without a configuration variable to disable
	it*.  This rendered python-mode completely useless for me, so I
	have added `python-use-skeletons', which is now off by default.
2006-10-22 20:39:36 +00:00
Richard M. Stallman be8b7dbd64 (python-preoutput-filter): Fix arg order to string-match. 2006-09-16 17:56:17 +00:00
Stefan Monnier 0b01facaa2 (python-font-lock-keywords): Add `self' and other quasi-keywords. 2006-09-09 19:48:36 +00:00
Stefan Monnier d8ca7d3475 Quieten the compiler about hippie-expand vars.
(python-send-string): Be slightly more careful about adding \n.
2006-09-09 19:42:35 +00:00
Stefan Monnier 132579d3e8 (python-eldoc-function): Re-enable quit while waiting for process. 2006-08-30 21:10:10 +00:00
Stefan Monnier e2ac11eba7 (python-send-command): Simplify.
(run-python): Don't generate a new buffer unless `new' was specified.
Make sure we send `import emacs' to the proper process.
2006-08-28 21:58:27 +00:00
Stefan Monnier 6cc91c85a0 (python-send-command): Don't wait for the command
to terminate.  Don't fiddle with compilation-parsing-end.
2006-08-28 21:13:34 +00:00
Stefan Monnier 426348643a (python-send-receive): Wait in the process's buffer so as to check the right
buffer-local variables.
2006-08-26 14:39:16 +00:00
Stefan Monnier 1c1095bfeb (python-preoutput-skip-next-prompt): New var.
(python-preoutput-continuation): Remove.
(python-preoutput-filter): Simplify correspondingly.
Remove handling of _emacs_ok.  Make sure we skip _emacs_out's prompts.
Loop around to catch embedded _emacs_out output.
(run-python): Send the import&print command on a single line.
(python-send-command): Send command&print on a single line.
(python-send-string): Only add double \n if needed.
(python-send-receive): Loop until the result comes.
(python-mode-running): Defvar it.
(python-setup-brm): Remove unused var `menu'.
Only bind py-mode-map and `features' around brm-init.
(python-calculate-indentation): Remove unused var `point'.
(python-beginning-of-defun): Remove unused var `def-line'.
2006-08-25 22:49:14 +00:00
Stefan Monnier 65a16bef23 Remove * in defcustom docstrings.
(run-python, python-proc, python-try-complete): Use derived-mode-p.
(python-mode): Set tab-width and indent-tabs-mode.
2006-08-20 18:14:50 +00:00
Stefan Monnier c7e8d385a2 Update to Dave Love's latest version.
(python-font-lock-keywords, python-mode): Don't use
font-lock-syntax-table, but match symbol elements explicitly instead.
(python-mode-map): Add help, and a few more key bindings.
(python-skip-comments/blanks): Move out of comments as well.
(python-continuation-line-p): Behave better with unbalanced parens.
(python-blank-line-p): New fun.
(python-open-block-statement-p): Don't use a heuristic.
(python-outdent-p): Better handle blocks-in-the-same-line.
(python-calculate-indentation): Misc improvements.
(python-comment-indent): Remove.
(python-block-pairs): New var.
(python-first-word): New fun.
(python-indentation-levels): Handle more common cases.
(python-indent-line-1): Add `leave' argument.
(python-indent-region): New fun.
(python-skip-out): New fun.
(python-beginning-of-statement, python-end-of-statement): Use it.
(python-next-statement): Return correct count even at eob.
(python-end-of-block): Fix paren-typo.
(python-imenu-create-index): Add module variables.
(run-python): Add `new' arg.  Check we're at a prompt before returning.
(python-send-command): Move to end of buffer.  Wait for prompt to return.
(python-set-proc): New fun.
(python-imports): New var.
(python-describe-symbol): Use it.  Adjust to new interface of `ehelp'.
(python-eldoc-function): Try to move out of arg list.
(python-outline-level): Offset by 1.
(python-find-imports): New fun.
(python-symbol-completions): Use python-imports.
(python-module-path, ffap-alist): Add support for ffap.
(python-skeletons, python-mode-abbrev-table, def-python-skeleton)
(pythin-insert-*, python-default-template, python-expand-template):
Add templates/skeletons.
(python-setup-brm): Support for Bicycle Repair Man.
(python-abbrev-syntax-table): New var.
(python-abbrev-pc-hook, python-pea-hook): New funs.
2006-08-20 17:55:16 +00:00
Stefan Monnier 45e46cb773 (python-continuation-line-p, python-beginning-of-statement):
syntax-ppss may return a negative depth.
2006-04-26 05:26:39 +00:00
Dan Nicolaescu 0fea1d1029 (python-mode): Fix typo. 2006-04-19 06:37:31 +00:00
Dan Nicolaescu 3398a4aee7 (python-mode): Add support for
hs-minor-mode.
2006-04-18 22:34:54 +00:00
Nick Roberts d91362c9e0 Update copyright for 2006. 2006-02-10 09:00:31 +00:00
Eli Zaretskii 13b0ddbd62 (python-mode) <eldoc-mode-hook>: Pass nil as the first arg to run-python. 2006-01-21 11:48:25 +00:00
Masatake YAMATO 283780dc88 Install to the CVS repository what I forgot to install in my
2005-10-16 changes.

* progmodes/python.el (python-complete-symbol): Pass the common
prefix substring of completion to `display-completion-list'.

* textmodes/org.el (org-complete): Ditto.
2005-10-18 04:31:16 +00:00
Eli Zaretskii ee6e99e0f0 (python-describe-symbol): Add globals() and locals() to the arguments
of emacs.ehelp.
2005-09-24 10:58:16 +00:00
Romain Francoise a24c45d2bd * progmodes/compile.el (compilation-start): Add autoload cookie.
* progmodes/antlr-mode.el: Don't autoload `compilation-start'.
* textmodes/sgml-mode.el: Likewise.
* progmodes/python.el: Likewise.
2005-08-27 14:38:22 +00:00
Lute Kamstra 3a35cf56e7 Update FSF's address. 2005-07-04 17:55:18 +00:00
Juanma Barranquero 419557b9e7 (python): Finish `defgroup' description with period.
(inferior-python-mode): "?\ " -> "?\s".
2005-07-04 03:20:48 +00:00
Stefan Monnier 533438b139 (python-check): Require `compile' before modifying its variables. 2005-06-29 06:58:42 +00:00
Richard M. Stallman 8f348211f9 (python-mode): Use new name eldoc-documentation-function. 2005-04-26 11:01:52 +00:00
Stefan Monnier 9f3f6a1854 (python-preoutput-filter): Fix last change. 2005-03-29 14:12:23 +00:00
Stefan Monnier 12566797d3 (python-preoutput-leftover): New var.
(python-preoutput-filter): Use it.
(python-send-receive): Loop until all the result has been received.
2005-03-28 14:36:25 +00:00
Stefan Monnier 95c9ef20be (python-close-block-statement-p)
(python-outdent-p, python-current-defun): Use symbol-end.
2005-03-25 14:36:08 +00:00
Kim F. Storm bf247b6ed0 Change release version from 21.4 to 22.1 throughout.
Change development version from 21.3.50 to 22.0.50.
2005-02-09 15:50:47 +00:00
Richard M. Stallman 68e442738d (python-mode): Use mode-require-final-newline. 2004-12-31 14:55:23 +00:00
Richard M. Stallman 25f35ef609 (python-font-lock-syntactic-keywords): Fix previous change. 2004-12-03 00:10:23 +00:00
Richard M. Stallman c22141472a (python-font-lock-syntactic-keywords): Check for escapes in the regexp.
(python-quote-syntax): Don't do it here.
2004-11-25 02:54:58 +00:00
Stefan Monnier abe0aa3e2a (run-python): Don't hard code *Python*. Don't modify process-environment.
(python-send-region, python-load-file): Don't assume that
python-buffer == (process-buffer (python-proc)).
(python-switch-to-python): Simplify.
2004-11-22 05:52:39 +00:00
Richard M. Stallman 2b2c3c7f62 Don't alter debug-ignored-errors. 2004-11-20 20:40:25 +00:00
Richard M. Stallman 7c6152ff9e (python-switch-to-python): If Python isn't running, start it. 2004-11-20 20:39:16 +00:00
Richard M. Stallman b830b63b85 (python-beginning-of-statement): Exit the loop if backward-up-list gets error. 2004-07-02 23:49:50 +00:00
Eli Zaretskii cebe0988ca (python-open-block-statement-p): Fix
indentation after a block opening that contains a comment.
2004-06-12 10:26:37 +00:00
Stefan Monnier 522067b2d4 (help-buffer): Autoload when compiling.
(python-after-info-look): Don't assume Info-goto-node returns non-nil.
(run-python): Prepend to any existing PYTHONPATH.
2004-05-10 18:36:09 +00:00
Stefan Monnier 07c7712fae (inferior-python-mode-map): Remove erroneous C-c C-z binding. 2004-05-10 15:32:01 +00:00
Juanma Barranquero 3299a03a32 (python-describe-symbol): Pass INTERACTIVE-P argument to `help-setup-xref'. 2004-05-08 16:40:01 +00:00
Stefan Monnier 24d5055cef Changes largely merged in from Dave Love's code. Doc fixes.
(python-mode-map): Add python-complete-symbol.
(python-comment-line-p, python-beginning-of-string): Use syntax-ppss.
(python-comment-indent, python-complete-symbol)
(python-symbol-completions, python-partial-symbol)
(python-try-complete): New.
(python-indent-line): Remove optional arg.  Use python-block-end-p.
(python-check): Bind compilation-error-regexp-alist.
(inferior-python-mode): Use rx.  Move keybindings to top level.
Set comint-input-filter.
(python-preoutput-filter): Use rx.
(python-input-filter): Re-introduce.
(python-proc): Start new process if necessary.
Check python-buffer non-nil.
(view-return-to-alist): Defvar.
(python-send-receive): New.
(python-eldoc-function): Use it.
(python-mode-running): Don't defvar.
(python-mode): Set comment-indent-function.
Maybe update hippie-expand-try-functions-list.
(python-indentation-levels): Initialize differently.
(python-block-end-p): New.
(python-indent-line): Use it.
(python-compilation-regexp-alist): Augment.
(run-python): Import `emacs' module to Python rather than loading
code directly.  Set python-buffer differently.
(python-send-region): Use emacs.eexecfile.  Fix orig-start calculation.
Use python-proc.
(python-send-command): Go to end of comint buffer.
(python-load-file): Use python-proc, emacs.eimport.
(python-describe-symbol): Simplify interactive form.
Use emacs.help.  Do use temp-buffer-show-hook.
Call print-help-return-message.
(hippie-exp): Require when compiling.
(python-preoutput-continuation): Use rx.
2004-05-06 20:22:32 +00:00
Stefan Monnier ee99b45b27 (python-compilation-line-number): Remove.
(python-compilation-regexp-alist): Don't use it any more.
(python-orig-start, python-input-filter): Remove.
(inferior-python-mode): Don't set up comint-input-filter-functions.
(python-send-region): Use compilation-fake-loc.
2004-05-01 21:16:07 +00:00
Stefan Monnier 56e6d6fecc (python-send-command): New fun.
(python-send-region, python-load-file): Use it.
2004-04-29 20:34:11 +00:00
Stefan Monnier c3f85d9536 (python-maybe-jython): Don't assume point-min==1. 2004-04-21 20:48:47 +00:00
Stefan Monnier c02484a0f2 (python-compilation-line-number): Fix braindamage.
(python-load-file): Fix python-orig-start setting.
2004-04-16 23:36:13 +00:00
Stefan Monnier b6ea794037 (python-after-info-look): Use with-no-warnings. 2004-04-16 22:58:28 +00:00
Stefan Monnier a1ae0e9c89 (python-orig-start-line, python-orig-file): Remove.
(python-orig-start): New var.
(python-input-filter, python-compilation-line-number)
(python-send-region, python-load-file): Use it.
2004-04-14 20:31:53 +00:00
Stefan Monnier 32efc702b3 (run-python): Fix use of \n.
(python-load-file): Remove `try' from Python fragment.
(python-describe-symbol): Fix message.
2004-04-14 20:16:05 +00:00
Stefan Monnier 1e328a982c (python-mouse-2-command, python-RET-command): Remove unused functions. 2004-04-14 18:59:10 +00:00
Stefan Monnier 0578dead3a Doc fixes. Changes for compiler warnings.
(syntax): Don't require.
(python) <defgroup>: Add :version.
(python-quote-syntax): Re-written.
(inferior-python-mode): Move stuff here from run-python and add
some more.
(python-preoutput-continuation, python-preoutput-result)
(python-dotty-syntax-table): New.
(python-describe-symbol): Use them.
(run-python): Move stuff to inferior-python-mode.  Modify code
loaded into Python.
(python-send-region): Use python-proc, python-send-string.
(python-send-string): Send newlines too.  Callers changed.
(python-load-file): Re-written.
(python-eldoc-function): New.
(info-look): Don't require.
(python-after-info-look): New.  A modified version of former
top-level code for use with eval-after-load.
(python-maybe-jython, python-guess-indent): Use widened buffer.
(python-fill-paragraph): Re-written.
(python-mode): Fix outline-regexp.  Set outline-heading-end-regexp,
eldoc-print-current-symbol-info-function.  Add to eldoc-mode-hook.
2004-04-13 18:02:03 +00:00
Stefan Monnier f9f25632b3 (run-python): Use compilation-shell-minor-mode.
Set compilation-error-regexp-alist earlier.
2004-04-13 16:05:36 +00:00
Stefan Monnier 6f480c7a38 New file. 2004-04-12 01:58:43 +00:00