aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * progmodes/python.el (inferior-python-mode): Fix hang inFabián Ezequiel Gallina2012-11-031-11/+18
| | | | | | jit-lock. Fixes: debbugs:12645
* * progmodes/python.el (python-mode-map): ReplaceFabián Ezequiel Gallina2012-10-111-10/+4
| | | | | subtitute-key-definition with proper command remapping. (python-nav--up-list): Fix behavior for blocks on the same level.
* Implemented `backward-up-list'-like navigation.Fabián Ezequiel Gallina2012-10-081-0/+64
| | | | | | | * progmodes/python.el (python-nav-up-list) (python-nav-backward-up-list): New functions. (python-mode-map): Define substitute key for backward-up-list to python-nav-backward-up-list.
* * progmodes/python.el (python-fill-paragraph): Rename fromFabián Ezequiel Gallina2012-10-081-12/+11
| | | | | | | python-fill-paragraph-function. Fixed fill-paragraph for decorators. Fixes: debbugs:12605
* * progmodes/python.el (python-shell-output-filter): Handle extraFabián Ezequiel Gallina2012-10-081-1/+3
| | | | | | carriage return in OSX. Fixes: debbugs:12409
* Fix shell handling of unbalanced quotes and parens in output.Fabián Ezequiel Gallina2012-10-081-24/+48
| | | | | | | | | * progmodes/python.el (python-rx-constituents): Added string-delimiter. (python-syntax-propertize-function): Use it. (python-shell-output-syntax-table): New var. (inferior-python-mode): Prevent unbalanced parens/quotes from previous output mess with current input context.
* Enhancements on forward-sexp movement.Fabián Ezequiel Gallina2012-10-081-145/+131
| | | | | | | | | | | | | | | * progmodes/python.el (python-nav-beginning-of-statement) (python-nav-end-of-statement): Return point-marker. (python-nav-forward-sexp): lisp-like forward-sexp behavior. (python-info-current-symbol) (python-info-statement-starts-block-p): Rename from python-info-beginning-of-block-p. (python-info-statement-ends-block-p): Rename from python-info-end-of-block-p. (python-info-beginning-of-statement-p) (python-info-end-of-statement-p) (python-info-beginning-of-block-p, python-info-end-of-block-p): New functions.
* * progmodes/python.el (inferior-python-mode)Fabián Ezequiel Gallina2012-10-071-7/+10
| | | | | (python-shell-make-comint): Fixed initialization of local variables copied from parent buffer.
* Enhancements to indentation.Fabián Ezequiel Gallina2012-10-071-5/+14
| | | | | | | * lisp/progmodes/python.el (python-indent-context): Give priority to inside-string context. Make comments indentation markers. (python-indent-region): Do not mess with strings, unless it's the enclosing set of quotes.
* Fix shell output retrieval and comint-prompt-regexp init.Fabián Ezequiel Gallina2012-10-071-31/+46
| | | | | | | | | | | | | | * progmodes/python.el (inferior-python-mode): (python-shell-make-comint): Fix initialization of comint-prompt-regexp from copied file local variables. (python-shell-fetched-lines): Remove var. (python-shell-output-filter-in-progress): Rename from python-shell-fetch-lines-in-progress. (python-shell-output-filter-buffer): Rename from python-shell-fetch-lines-string. (python-shell-fetch-lines-filter): Delete function. (python-shell-output-filter): New function. (python-shell-send-string-no-output): Use them.
* 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
|