]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(imenu-example--create-python-index-engine): Fix nesting breakage when
authorBarry Warsaw <barry@python.org>
Tue, 18 Aug 1998 02:00:44 +0000 (02:00 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 18 Aug 1998 02:00:44 +0000 (02:00 +0000)
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!

Misc/python-mode.el

index b0f0ab64f8a10ac4fe3bad872b4657bfbe2e922e..20c5c2ccd022c5c841f460557834fdab6a5b6dd1 100644 (file)
@@ -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)))