From: Barry Warsaw Date: Tue, 18 Aug 1998 02:00:44 +0000 (+0000) Subject: (imenu-example--create-python-index-engine): Fix nesting breakage when X-Git-Tag: v1.5.2a2~388 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93c88cca06dd0ce57c9c7c4bc76cb018cc5903ad;p=thirdparty%2FPython%2Fcpython.git (imenu-example--create-python-index-engine): Fix nesting breakage when a method definition has args that span multiple lines; be sure to go to the beginning of the method definition -- but watch out for the match-data! --- diff --git a/Misc/python-mode.el b/Misc/python-mode.el index b0f0ab64f8a1..20c5c2ccd022 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -891,6 +891,8 @@ of the first definition found." (setq def-name (buffer-substring-no-properties (match-beginning cur-paren) (match-end cur-paren)))) + (save-match-data + (py-beginning-of-def-or-class)) (beginning-of-line) (setq cur-indent (current-indentation)))