(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 b0f0ab6..20c5c2c 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -891,6 +891,8 @@
(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)))