* progmodes/python.el (python-info-current-defun): Fix failed

defun name retrieval because of unwanted match-data cluttering.
This commit is contained in:
Fabián Ezequiel Gallina 2013-02-19 15:53:57 -03:00
parent 2af3b9c16e
commit 33c0cb2549
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-02-19 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-info-current-defun): Fix failed
defun name retrieval because of unwanted match-data cluttering.
2013-02-19 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-indent-context): Fix

View file

@ -2976,7 +2976,10 @@ not inside a defun."
;; Else go to the end of defun and add
;; up the current indentation to the
;; ending position.
(python-nav-end-of-defun)
(save-match-data
;; FIXME: avoid cluttering match-data
;; where's not wanted.
(python-nav-end-of-defun))
(+ (point)
(if (>= (current-indentation) min-indent)
(1+ (current-indentation))