1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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)
This commit is contained in:
kobarity 2024-05-25 23:20:10 +09:00 committed by Eli Zaretskii
parent 6cc23f4b2a
commit 25ab3e7be8
2 changed files with 20 additions and 1 deletions

View file

@ -5722,7 +5722,8 @@ Interactively, prompt for symbol."
(defun python-hideshow-forward-sexp-function (_arg)
"Python specific `forward-sexp' function for `hs-minor-mode'.
Argument ARG is ignored."
(python-nav-end-of-block))
(python-nav-end-of-block)
(end-of-line))
(defun python-hideshow-find-next-block (regexp maxp comments)
"Python specific `hs-find-next-block' function for `hs-minor-mode'.