aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-11-04 18:47:04 +0100
committerLars Ingebrigtsen2021-11-04 18:47:04 +0100
commit1def47fd98449aee5b13741abcb52909ed8c40ac (patch)
tree40382b0102f069a8ff7b1e0a334ddb27951a825a /lisp/progmodes/python.el
parent1c3e45396e07b6ec7246c2d5763c187092a55264 (diff)
downloademacs-1def47fd98449aee5b13741abcb52909ed8c40ac.tar.gz
emacs-1def47fd98449aee5b13741abcb52909ed8c40ac.zip
Fix return value of python-nav-end-of-defun
* lisp/progmodes/python.el (python-nav-end-of-defun): Return non-nil if in a def/class, as the doc string implies (bug#51601).
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 34bff0152ec..7b0295afb74 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1518,7 +1518,10 @@ Returns nil if point is not in a def or class."
1518 (python-util-forward-comment -1) 1518 (python-util-forward-comment -1)
1519 (forward-line 1) 1519 (forward-line 1)
1520 ;; Ensure point moves forward. 1520 ;; Ensure point moves forward.
1521 (and (> beg-pos (point)) (goto-char beg-pos))))) 1521 (and (> beg-pos (point)) (goto-char beg-pos))
1522 ;; Return non-nil if we did something (because then we were in a
1523 ;; def/class).
1524 (/= beg-pos (point)))))
1522 1525
1523(defun python-nav--syntactically (fn poscompfn &optional contextfn) 1526(defun python-nav--syntactically (fn poscompfn &optional contextfn)
1524 "Move point using FN avoiding places with specific context. 1527 "Move point using FN avoiding places with specific context.