From 33c0cb2549452f1ba1c1da0a1d0e45559c0be99b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Tue, 19 Feb 2013 15:53:57 -0300 Subject: [PATCH] * progmodes/python.el (python-info-current-defun): Fix failed defun name retrieval because of unwanted match-data cluttering. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/python.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f99cab9edbf..390c825ad0a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-02-19 Fabián Ezequiel Gallina + + * 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 * progmodes/python.el (python-indent-context): Fix diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 49eaff637a6..1ee95daa0a9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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)) -- 2.39.5