summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)))