summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-08-18 02:00:44 (GMT)
committerBarry Warsaw <barry@python.org>1998-08-18 02:00:44 (GMT)
commit93c88cca06dd0ce57c9c7c4bc76cb018cc5903ad (patch)
tree278d62c4986e48fe72c05e1cd379fc2d6346f909 /Misc
parent664dcd5b5e9d5e873824f833b83f2846a429a010 (diff)
downloadcpython-93c88cca06dd0ce57c9c7c4bc76cb018cc5903ad.zip
cpython-93c88cca06dd0ce57c9c7c4bc76cb018cc5903ad.tar.gz
cpython-93c88cca06dd0ce57c9c7c4bc76cb018cc5903ad.tar.bz2
(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!
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index b0f0ab6..20c5c2c 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)))