aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorkobarity2024-05-25 23:20:10 +0900
committerEli Zaretskii2024-06-09 16:49:05 +0300
commit25ab3e7be8b1c71b5939682c5b5fe6810807bcc5 (patch)
tree70ce6243f94e65dba808b0f986bd64114566a143 /lisp/progmodes/python.el
parent6cc23f4b2a5e7dd8c68f73a310e3c602804f855d (diff)
downloademacs-25ab3e7be8b1c71b5939682c5b5fe6810807bcc5.tar.gz
emacs-25ab3e7be8b1c71b5939682c5b5fe6810807bcc5.zip
Fix hiding a Python block ending with a comment
* lisp/progmodes/python.el (python-hideshow-forward-sexp-function): Move point to the end of the line. * test/lisp/progmodes/python-tests.el (python-hideshow-hide-block-2): New test. (Bug#71170)
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index bb2bf1731b4..2664d71d358 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -5722,7 +5722,8 @@ Interactively, prompt for symbol."
5722(defun python-hideshow-forward-sexp-function (_arg) 5722(defun python-hideshow-forward-sexp-function (_arg)
5723 "Python specific `forward-sexp' function for `hs-minor-mode'. 5723 "Python specific `forward-sexp' function for `hs-minor-mode'.
5724Argument ARG is ignored." 5724Argument ARG is ignored."
5725 (python-nav-end-of-block)) 5725 (python-nav-end-of-block)
5726 (end-of-line))
5726 5727
5727(defun python-hideshow-find-next-block (regexp maxp comments) 5728(defun python-hideshow-find-next-block (regexp maxp comments)
5728 "Python specific `hs-find-next-block' function for `hs-minor-mode'. 5729 "Python specific `hs-find-next-block' function for `hs-minor-mode'.