aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Enhancements to docstring formatting when filling paragraphs.Fabián Ezequiel Gallina2012-10-051-14/+32
| | | | | | | * progmodes/python.el (python-fill-docstring-style): Rename from python-fill-string-style. Added new style. (python-fill-string): Use new style. Better checks for docstrings.
* Spelling fixes.Paul Eggert2012-10-041-1/+1
|
* Allow user to set docstring style for fill-paragraph.Fabián Ezequiel Gallina2012-10-041-48/+128
| | | | | | | | | | * progmodes/python.el (python-fill-comment-function, python-fill-string-function) (python-fill-decorator-function, python-fill-paren-function): Remove :safe for defcustoms. (python-fill-string-style): New defcustom (python-fill-paragraph-function): Enhanced context detection. (python-fill-string): Honor python-fill-string-style settings.
* Fix cornercase for string syntax.Fabián Ezequiel Gallina2012-10-031-16/+10
| | | | | | | | * progmodes/python.el (python-syntax-propertize-function): Simplify and enhance the regexp for unescaped quotes. Now it also matches quotes in weird situations like the single quote in "something\"'". (python-syntax-stringify): Simplify num-quotes detecting code.
* Shell output catching a la gud-gdb.Fabián Ezequiel Gallina2012-09-301-18/+32
| | | | | | | | * progmodes/python.el (python-shell-fetch-lines-in-progress) (python-shell-fetch-lines-string, python-shell-fetched-lines): New Vars. (python-shell-fetch-lines-filter): New function. (python-shell-send-string-no-output): Use them.
* Enhancements for triple-quote string syntax.Fabián Ezequiel Gallina2012-09-301-12/+13
| | | | | | * progmodes/python.el (python-syntax-propertize-function): Match both quote cases in one regexp. (python-syntax-stringify): Handle matches properly.
* * progmodes/python.el:Fabián Ezequiel Gallina2012-09-241-10/+9
| | | | | (python-shell-send-buffer): Better handling of "if __name__ == '__main__':" conditionals when sending the buffer.
* Enhancements for triple-quote string syntax.Fabián Ezequiel Gallina2012-09-241-45/+61
| | | | | | | * progmodes/python.el (python-quote-syntax): Remove. (python-syntax-propertize-function): New value. (python-syntax-count-quotes, python-syntax-stringify): New functions.
* * progmodes/python.el (python-indent-line): More consistent cursorFabián Ezequiel Gallina2012-09-231-10/+21
| | | | movement behavior.
* * progmodes/python.el (python-shell-send-string): WhenMatt McClure2012-09-071-3/+13
| | | | | | | default-directory is remote, create temp file on remote filesystem. (python-shell-send-file): When file is remote, pass local view of file paths to remote Python interpreter. (Bug#12340)
* Replace version 24.2 with 24.3 where appropriate (hopefully)Glenn Morris2012-08-151-11/+11
|
* * progmodes/python.el (python-shell-send-string):Fabián Ezequiel Gallina2012-08-141-5/+3
| | | | | (python-shell-send-setup-code): Do not use `format' with `message'.
* Use `completion-table-dynamic' for completion functions.Fabián Ezequiel Gallina2012-08-141-71/+72
| | | | | | | | | * progmodes/python.el (python-shell-completion--do-completion-at-point) (python-shell-completion--get-completions): Remove functions. (python-shell-completion-complete-at-point): New function. (python-completion-complete-at-point): Use it.
* Remove some unnecessary bindings of same-window-* variables.Chong Yidong2012-08-111-5/+1
| | | | | | | | | | * lisp/progmodes/python.el (python-shell-get-process-name): Don't mess with same-window-buffer-names. * lisp/eshell/eshell.el (eshell-add-to-window-buffer-names) (eshell-remove-from-window-buffer-names): Make obsolete. (eshell-buffer-name, eshell-unload-hook): Don't use them. (eshell): Just use pop-to-buffer-same-window instead.
* * progmodes/python.el (python-pdbtrack-tracked-buffer)Fabián Ezequiel Gallina2012-08-091-4/+5
| | | | | | (python-pdbtrack-buffers-to-kill, python-shell-internal-buffer) (python-shell-internal-last-output): Use make-local-variable instead of make-variable-buffer-local.
* * progmodes/python.el: Enhancements to forward-sexp.Fabián Ezequiel Gallina2012-08-091-72/+167
| | | | | | | (python-nav-forward-sexp): Rename from python-nav-forward-sexp-function. (python-nav--forward-sexp, python-nav--backward-sexp): New functions.
* * progmodes/python.el Fixed defsubst warning.Fabián Ezequiel Gallina2012-08-071-73/+79
| | | | | | | | (python-syntax-context) Rename from python-info-ppss-context. (python-syntax-context-type): Rename from python-info-ppss-context-type. (python-syntax-comment-or-string-p): Rename from python-info-ppss-comment-or-string-p.
* Make internal shell process buffer names start with space.Fabián Ezequiel Gallina2012-08-061-15/+22
| | | | | | | | * progmodes/python.el (python-shell-make-comint): Add optional argument INTERNAL. (run-python-internal): Use it. (python-shell-internal-get-or-create-process): Check for new internal buffer names.
* Shell processes: enhancements to startup and CEDET compatibility.Fabián Ezequiel Gallina2012-07-311-28/+41
| | | | | | | | | | | * progmodes/python.el (python-shell-send-setup-max-wait): Delete var. (python-shell-make-comint): accept-process-output at startup. (run-python-internal): Set inferior-python-mode-hook to nil. (python-shell-internal-get-or-create-process): call sit-for. (python-preoutput-result): Add obsolete alias. (python-shell-internal-send-string): Use it. (python-shell-send-setup-code): Remove call to accept-process-output.
* * progmodes/python.el (run-python-internal): Disable font lock forFabián Ezequiel Gallina2012-07-311-5/+6
| | | | internal shells.
* Consistent completion in inferior python with emacs -nw.Fabián Ezequiel Gallina2012-07-271-3/+1
| | | | | | | * progmodes/python.el (inferior-python-mode): replace "<tab>" binding in inferior-python-mode-map with "\t". (python-shell-completion-complete-at-point) (python-completion-complete-at-point): Remove interactive spec.
* * lisp/progmodes/python.el (python-mode-map): Added keybinding forFabián Ezequiel Gallina2012-07-271-16/+19
| | | | | | | | run-python. (python-shell-make-comint): Fix pop-to-buffer call. (run-python): Autoload. New arg SHOW. (python-shell-get-or-create-process): Do not pop python process buffer.
* Enhancements to ppss related code (thanks Stefan).Fabián Ezequiel Gallina2012-07-181-49/+24
| | | | | | | | | | | | | * progmodes/python.el (python-indent-context) (python-indent-calculate-indentation, python-indent-dedent-line) (python-indent-electric-colon, python-nav-forward-block) (python-mode-abbrev-table) (python-info-assignment-continuation-line-p): Simplified checks for ppss context. (python-info-continuation-line-p): Cleanup. (python-info-ppss-context): Do not catch 'quote. (python-info-ppss-context-type) (python-info-ppss-comment-or-string-p): Simplify.
* progmodes/python.el: Set file local vars at end of file and clean tabs.Fabián Ezequiel Gallina2012-07-181-2/+8
|
* * progmodes/python.el: Enhancements to eldoc support.Fabián Ezequiel Gallina2012-07-181-49/+54
| | | | | | | | (python-info-current-symbol): New function. (python-eldoc-at-point): Use python-info-current-symbol. (python-info-current-defun): Fix cornercase on first defun scan. (python-eldoc--get-doc-at-point): Use python-info-current-symbol and signal error when no inferior python process is available.
* New utility functions + python-info-ppss-context fix.Fabián Ezequiel Gallina2012-07-171-1/+12
| | | | | | | | * progmodes/python.el (python-info-beginning-of-block-statement-p) (python-info-ppss-comment-or-string-p): New functions. (python-info-ppss-context): Small fix for string check. Fixes: debbugs:11910
* Final renames and doc fixes for movement commands.Fabián Ezequiel Gallina2012-07-171-34/+37
| | | | | | | | | | | | * progmodes/python.el (python-nav-beginning-of-statement): Rename from python-nav-statement-start. (python-nav-end-of-statement): Rename from python-nav-statement-end. (python-nav-beginning-of-block): Rename from python-nav-block-start. (python-nav-end-of-block): Rename from python-nav-block-end. Fixes: debbugs:11899
* * progmodes/python.el (python-shell-send-string-no-output): AllowFabián Ezequiel Gallina2012-07-171-12/+17
| | | | | | | accept-process-output to quit, keeping shell process ready for future interactions. Fixes: debbugs:11868
* * progmodes/python.el: Simplified imenu implementation.Fabián Ezequiel Gallina2012-07-161-178/+8
| | | | | | | | | | | | | | | (python-nav-jump-to-defun): Remove command. (python-mode-map): Use `imenu' instead. (python-nav-list-defun-positions-cache) (python-imenu-include-defun-type, python-imenu-make-tree) (python-imenu-subtree-root-label, python-imenu-index-alist): Remove vars. (python-nav-list-defun-positions, python-nav-read-defun) (python-imenu-tree-assoc, python-imenu-make-element-tree) (python-imenu-make-tree, python-imenu-create-index): Remove functions. (python-mode): Update to interact with imenu by setting `imenu-extract-index-name-function' only.
* * progmodes/python.el: Enhancements to navigation commands.Fabián Ezequiel Gallina2012-07-161-25/+201
| | | | | | | | | | | | | (python-nav-backward-sentence) (python-nav-forward-sentence): Remove. (python-nav-backward-statement, python-nav-forward-statement) (python-nav-statement-start, python-nav-statement-end) (python-nav-backward-block, python-nav-forward-block) (python-nav-block-start, python-nav-block-end) (python-nav-forward-sexp-function) (python-info-current-line-comment-p) (python-info-current-line-empty-p): New functions. (python-indent-context): Use `python-nav-statement-start'.
* Mark python-mode abbrevs as system abbrevs.Chong Yidong2012-06-231-1/+2
| | | | | | | * progmodes/python.el (python-skeleton-define): Mark abbrevs as system abbrevs. * ansi-color.el (ansi-color-apply-on-region): Doc fix.
* * lisp/progmodes/python.el (python-mode): Derive from prog-mode.Glenn Morris2012-06-191-1/+1
|
* * lisp/progmodes/python.el (python-rx-constituents): Move backquote.Stefan Monnier2012-06-181-14/+16
| | | | (python-skeleton-define, python-define-auxiliary-skeleton): Use `declare'.
* Fix python.el obsolescence versionsGlenn Morris2012-06-181-4/+4
| | | | | * lisp/progmodes/python.el (python-proc, python-buffer) (python-send-receive, python-send-string): Fix obsolete versions.
* Add coding cookieGlenn Morris2012-06-181-1/+1
|
* Spelling fixes.Paul Eggert2012-06-171-13/+13
|
* lisp/progmodes/python.el: Updated Copyright years.old-branches/pythonFabián Ezequiel Gallina2012-06-141-1/+1
|
* * lisp/progmodes/python.el: (python-indent, python-guess-indent,Fabián Ezequiel Gallina2012-06-141-0/+10
| | | | | python-use-skeletons): New obsolete variable aliases. (python-indent-guess-indent-offset): Make interactive.
* Migrated python-font-lock-syntactic-keywords to ↵Fabián Ezequiel Gallina2012-05-171-12/+14
| | | | | | | | | | | | | python-syntax-propertize-function This is a backport of Stefan Monnier's migration to the new font-lock machinery (introduced in 2010-09-10T23:13:42Z!monnier@iro.umontreal.ca). New Vars: + python-syntax-propertize-function Deleted Vars: + python-font-lock-syntactic-keywords
* Copyright information updateFabián Ezequiel Gallina2012-05-171-16/+12
|
* Revert "Merge pull request #83 from tkf/empty-triple-quote"Fabián Ezequiel Gallina2012-05-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit f4d086427343eb0b8bc91355388d2437c568b1f6, reversing changes made to 8f697fd2ef23a9e1d9a06ac8ca419d76ccedb27d. While the fix worked with empty triple quoted strings it broke simpler cases like these: """ def someting(a, b, c): " """ or ''' def someting(a, b, c): ' ''' Another approach is needed for giving triple quoted string the correct syntax.
* Make `which-func-functions' defaults to '(python-info-current-defun)Fabián Ezequiel Gallina2012-05-171-0/+2
|
* Function documentation enhancementsFabián Ezequiel Gallina2012-05-171-7/+9
|
* New defun navigation machineryFabián Ezequiel Gallina2012-05-171-78/+92
| | | | | | | | | | | | | | | | | | | `python-nav-beginning-of-defun' and `python-beginning-of-defun-function' have changed and now they don't handle decorators anymore. `python-end-of-defun-function' is now smart enough to detect the real ending of the current defun. `python-shell-send-defun' always sends the outermost defun and includes decorators. When called with prefix argument the decorators are skipped. `python-info-current-defun' has been modified to use the new defun movement API. New Functions: + python-info-looking-at-beginning-of-defun
* Enhancements on `python-beginning-of-defun-function' for `mark-defun' behavior.Fabián Ezequiel Gallina2012-05-171-10/+13
| | | | `mark-defun' was failing when point was right at the start of a defun.
* `python-nav-list-defun-positions' now caches defuns positions (#75)Fabián Ezequiel Gallina2012-05-171-22/+33
| | | | | | | | | | | | | | | This is a simplified version of @dandavison pull request (thanks dan!) `python-nav-list-defun-positions' now uses `python-nav-list-defun-positions-cache' buffer local variable to store cached values of defun positions. `python-nav-jump-to-defun' now benefits from this new cache and if called with prefix argument it will invalidate it so new defuns are scanned. New Vars: + `python-nav-list-defun-positions-cache'
* Enhancements to `python-end-of-defun-function' so it's not blocked by top ↵Fabián Ezequiel Gallina2012-05-171-6/+3
| | | | level assignments (fixes #64)
* Variable name changeDan Davison2012-05-171-3/+3
| | | | python-shell-enable-syntax-highlighting -> python-shell-enable-font-lock
* Enhancements to `python-indent-post-self-insert-function'Fabián Ezequiel Gallina2012-05-171-11/+8
| | | | Fixed case where the paren base indentation is not 0.
* Enhanced closing block notification when line is indented or a colon is ↵Fabián Ezequiel Gallina2012-05-171-10/+17
| | | | | | | | | | | inserted. `python-indent-line' and `python-indent-electric-colon' now uses the new `python-info-closing-block-message' function that takes care of messaging the block the current line is closing (if applicable). New Functions: + `python-info-closing-block-message'