summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/python.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index afafd1b42cd..adf7b33ccbb 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3163,9 +3163,12 @@ t when called interactively."
(beginning-of-line 1))
(> (current-indentation) 0)))
(when (not arg)
- (while (and (forward-line -1)
- (looking-at (python-rx decorator))))
- (forward-line 1))
+ (while (and
+ (eq (forward-line -1) 0)
+ (if (looking-at (python-rx decorator))
+ t
+ (forward-line 1)
+ nil))))
(point-marker))
(progn
(or (python-nav-end-of-defun)