[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1def47f: Fix return value of python-nav-end-of-defun
From: |
Lars Ingebrigtsen |
Subject: |
master 1def47f: Fix return value of python-nav-end-of-defun |
Date: |
Thu, 4 Nov 2021 13:47:36 -0400 (EDT) |
branch: master
commit 1def47fd98449aee5b13741abcb52909ed8c40ac
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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).
---
lisp/progmodes/python.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 34bff01..7b0295a 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."
(python-util-forward-comment -1)
(forward-line 1)
;; Ensure point moves forward.
- (and (> beg-pos (point)) (goto-char beg-pos)))))
+ (and (> beg-pos (point)) (goto-char beg-pos))
+ ;; Return non-nil if we did something (because then we were in a
+ ;; def/class).
+ (/= beg-pos (point)))))
(defun python-nav--syntactically (fn poscompfn &optional contextfn)
"Move point using FN avoiding places with specific context.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1def47f: Fix return value of python-nav-end-of-defun,
Lars Ingebrigtsen <=