aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Small fixes to 2013-04-19T02:31:09Z!fgallina@gnu.orgFabián Ezequiel Gallina2013-04-191-4/+5
| | | | | | | | | | | | | | | | * lisp/ChangeLog: Fix Changelog Entry. * progmodes/python.el (python-imenu-create-flat-index): Remove leftover `message' call and give credit to old imenu--flatten-index-alist.
* | New faster Imenu implementation.Fabián Ezequiel Gallina2013-04-181-21/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el: (python-imenu-prev-index-position): (python-imenu-format-item-label-function) (python-imenu-format-parent-item-label-function) (python-imenu-format-parent-item-jump-label-function): New vars. (python-imenu-format-item-label) (python-imenu-format-parent-item-label) (python-imenu-format-parent-item-jump-label) (python-imenu--put-parent, python-imenu--build-tree) (python-imenu-create-index, python-imenu-create-flat-index) (python-util-popn): New functions. (python-mode): Set imenu-create-index-function to python-imenu-create-index. * test/automated/python-tests.el (python-imenu-prev-index-position-1): Removed test. (python-imenu-create-index-1, python-imenu-create-flat-index-1): New tests. Fixes: debbugs:14058
* | * lisp/progmodes/python.el (python-nav--syntactically): Fix cornercasesFabián Ezequiel Gallina2013-04-171-22/+26
| | | | | | | | | | | | | | | | and do not care about match data. * test/automated/python-tests.el (python-nav-backward-defun-2) (python-nav-backward-defun-3, python-nav-forward-defun-2) (python-nav-forward-defun-3): New tests.
* | New defun movement commands.Fabián Ezequiel Gallina2013-04-171-0/+60
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-nav--syntactically) (python-nav--forward-defun, python-nav-backward-defun) (python-nav-forward-defun): New functions. * test/automated/python-tests.el (python-nav-backward-defun-1) (python-nav-forward-defun-1): New tests.
* | * progmodes/python.el (python-syntax--context-compiler-macro): New defun.Fabián Ezequiel Gallina2013-04-161-12/+14
| | | | | | | | | | (python-syntax-context): Use named compiler-macro for backwards compatibility with Emacs 24.x.
* | * lisp/progmodes/python.el (python-mode-skeleton-abbrev-table): Rename fromStefan Monnier2013-04-161-5/+9
| | | | | | | | | | | | | | | | | | | | python-mode-abbrev-table. (python-skeleton-define): Adjust accordingly. (python-mode-abbrev-table): New table that inherits from it so that python-skeleton-autoinsert does not affect non-skeleton abbrevs. * lisp/abbrev.el (abbrev--symbol): New function, extracted from abbrev-symbol. (abbrev-symbol): Use it. (abbrev--before-point): Use it since we already handle inheritance.
* | Merge from emacs-24; up to 2012-12-26T16:22:18Z!michael.albinus@gmx.deGlenn Morris2013-03-301-3/+13
|\ \ | |/
| * Un-indent after "pass" and "return" statementsFabián Ezequiel Gallina2013-03-251-3/+13
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-indent-block-enders): New var. (python-indent-calculate-indentation): Use it. * test/automated/python-tests.el (python-indent-block-enders): New test. (python-info-current-defun-2): Fix test. Fixes: debbugs:13888
* | Merge from emacs-24; up to 2012-12-21T07:35:02Z!ueno@gnu.orgGlenn Morris2013-02-211-32/+33
|\ \ | |/
| * * progmodes/python.el (python-info-current-defun): EnhanceFabián Ezequiel Gallina2013-02-201-35/+33
| | | | | | | | match-data cluttering prevention.
| * * progmodes/python.el (python-info-current-defun): Fix failedFabián Ezequiel Gallina2013-02-191-1/+4
| | | | | | | | defun name retrieval because of unwanted match-data cluttering.
* | Merge from emacs-24; up to 2012-12-20T16:09:05Z!dmantipov@yandex.ruGlenn Morris2013-02-181-13/+12
|\ \ | |/
| * * progmodes/python.el (python-indent-context): FixFabián Ezequiel Gallina2013-02-191-13/+12
| | | | | | | | | | | | | | | | | | | | | | python-info-line-ends-backslash-p call. (python-info-line-ends-backslash-p) (python-info-beginning-of-backslash): Respect line-number argument. (python-info-current-line-comment-p): Fix behavior when not at beginning-of-line. (python-util-position): Remove function. (python-util-goto-line): New function.
* | Merge from emacs-24; up to 2012-12-19T13:01:16Z!michael.albinus@gmx.dePaul Eggert2013-02-141-53/+76
|\ \ | |/
| * * progmodes/python.el: Explain how to restore "cc-mode"-likeFabián Ezequiel Gallina2013-02-131-20/+22
| | | | | | | | | | | | | | | | forward-sexp movement in header documentation. (python-nav--forward-sexp): Behave like emacs-lisp-mode in comments and strings (GH bug 114). Fixes: debbugs:13642
| * * progmodes/python.el (python-info-current-defun): Fix currentFabián Ezequiel Gallina2013-02-131-33/+54
| | | | | | | | | | | | defun detection. Fixes: debbugs:13618
* | Spelling fixes.Paul Eggert2013-02-011-1/+1
| |
* | Merge from emacs-24; up to 2012-12-13T00:52:17Z!yamaoka@jpl.orgGlenn Morris2013-01-301-9/+11
|\ \ | |/
| * * progmodes/python.elFabián Ezequiel Gallina2013-01-301-9/+11
| | | | | | | | | | (python-pdbtrack-comint-output-filter-function): Enhancements on stacktrace detection. (thanks @gnovak)
* | Merge from emacs-24; up to 2012-12-12T22:29:54Z!yamaoka@jpl.orgGlenn Morris2013-01-301-1/+5
|\ \ | |/
| * * progmodes/python.el (python-shell-parse-command): FindFabián Ezequiel Gallina2013-01-281-1/+5
| | | | | | | | python-shell-interpreter with modified environment.
* | Merge from emacs-24; up to 2012-12-11T18:52:31Z!monnier@iro.umontreal.caGlenn Morris2013-01-241-1/+4
|\ \ | |/
| * * lisp/progmodes/python.el: Enhancements to header documentation aboutFabián Ezequiel Gallina2013-01-231-1/+4
| | | | | | | | | | | | skeletons. Fixes: debbugs:5716
* | Merge from emacs-24; up to 2012-12-10T20:27:33Z!eggert@cs.ucla.eduGlenn Morris2013-01-131-2/+11
|\ \ | |/
| * * progmodes/python.el (python-nav-end-of-statement): FixFabián Ezequiel Gallina2013-01-101-2/+11
| | | | | | | | cornercase when handling multiline strings.
* | Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.caPaul Eggert2013-01-021-11/+22
|\ \ | |/
| * Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
| |
| * * progmodes/python.el (python-nav-end-of-statement): Rewrite inFabián Ezequiel Gallina2012-12-311-9/+20
| | | | | | | | | | | | | | order to improve efficiency (Based on Daniel Colascione's <dancol@dancol.org> patch). Fixes: debbugs:13182
| * * progmodes/python.el: Bump defgroup :version to 24.3.Fabián Ezequiel Gallina2012-12-311-1/+1
| |
| * Backported revisions 2012-12-29T12:33:33Z!fgallina@gnu.org and ↵Fabián Ezequiel Gallina2012-12-311-14/+28
| | | | | | | | 2012-12-29T12:57:49Z!fgallina@gnu.org from trunk.
* | * progmodes/python.el: Support other commands triggeringFabián Ezequiel Gallina2012-12-291-13/+20
| | | | | | | | | | | | python-indent-line so indentation cycling continues to work. (python-indent-trigger-commands): New defcustom. (python-indent-line): Use it.
* | * progmodes/python.el (python-shell-send-region): Add blank linesFabián Ezequiel Gallina2012-12-291-1/+8
| | | | | | | | for non sent code so backtraces remain correct.
* | * progmodes/python.el: Remove cl dependency.Fabián Ezequiel Gallina2012-12-291-8/+7
| | | | | | | | | | (python-syntax-count-quotes): Replace incf call. (python-fill-string): Replace setf call.
* | Merge from emacs-24; up to 2012-11-30T04:44:52Z!cyd@gnu.orgGlenn Morris2012-12-121-8/+8
|\ \ | |/
| * * progmodes/python.el (python-skeleton-class)Fabián Ezequiel Gallina2012-12-111-8/+8
| | | | | | | | (python-skeleton-def): Do not add space after defun name.
* | Merge from emacs-24; up to 2012-11-20T20:06:17Z!monnier@iro.umontreal.caGlenn Morris2012-11-261-10/+28
|\ \ | |/
| * * progmodes/python.el:Fabián Ezequiel Gallina2012-11-261-1/+1
| | | | | | | | | | (python-indent-guess-indent-offset): If indentation is guessed make python-indent-offset variable buffer local.
| * Fix Imenu regression.Fabián Ezequiel Gallina2012-11-261-9/+27
| | | | | | | | | | | | | | * progmodes/python.el: (python-nav-beginning-of-defun): Fix forward movement when statement(s) separates point from defun. (python-imenu-prev-index-position): New function.
* | * lisp/emacs-lisp/byte-run.el (defun-declarations-alist):Stefan Monnier2012-11-191-33/+44
|/ | | | | | | | Allow compiler-macros to be lambda expressions. * lisp/progmodes/python.el: Use cl-lib. Move var declarations outside of eval-when-compile. (python-syntax-context): Add compiler-macro. (python-font-lock-keywords): Simplify with De Morgan.
* Fix end-of-defun misbehavior.Fabián Ezequiel Gallina2012-11-121-68/+69
| | | | | | | | | | | * progmodes/python.el (python-nav-beginning-of-defun): Rename from python-beginning-of-defun-function. Handle nested defuns correctly. (python-nav-end-of-defun): Rename from python-end-of-defun-function. Ensure forward movement. (python-info-current-defun): Reimplemented to work as intended with new fixed python-nav-{end,beginning}-of-defun. Stop scanning parent defuns as soon as possible.
* * 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.