aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2022-09-24 10:24:54 -0400
committerStefan Monnier2022-09-24 10:24:54 -0400
commit583ebfa4148a817e144fe0f517e2ea81530f252c (patch)
tree5fbf7f1a77b26b3e803ea473df748a66b27dbddf /lisp
parent597c59078ec3cc352562bfe4898072ee11ad8b0b (diff)
downloademacs-583ebfa4148a817e144fe0f517e2ea81530f252c.tar.gz
emacs-583ebfa4148a817e144fe0f517e2ea81530f252c.zip
* lisp/progmodes/hideshow.el (hs-toggle-hiding): Fix `interactive` form
This fixes the first part of bug#52092, which is a regression introduced by commit d0e9113de97.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/hideshow.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index f574ec84fbe..4b234197641 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -740,6 +740,8 @@ and `case-fold-search' are both t."
740 740
741(defun hs-already-hidden-p () 741(defun hs-already-hidden-p ()
742 "Return non-nil if point is in an already-hidden block, otherwise nil." 742 "Return non-nil if point is in an already-hidden block, otherwise nil."
743 ;; FIXME: We should probably also consider ourselves "in" a hidden block
744 ;; when point is right at the edge after a hidden block (bug#52092).
743 (save-excursion 745 (save-excursion
744 (let ((c-reg (hs-inside-comment-p))) 746 (let ((c-reg (hs-inside-comment-p)))
745 (if (and c-reg (nth 0 c-reg)) 747 (if (and c-reg (nth 0 c-reg))
@@ -893,7 +895,7 @@ The hook `hs-hide-hook' is run; see `run-hooks'."
893 "Toggle hiding/showing of a block. 895 "Toggle hiding/showing of a block.
894See `hs-hide-block' and `hs-show-block'. 896See `hs-hide-block' and `hs-show-block'.
895Argument E should be the event that triggered this action." 897Argument E should be the event that triggered this action."
896 (interactive) 898 (interactive (list last-nonmenu-event))
897 (hs-life-goes-on 899 (hs-life-goes-on
898 (posn-set-point (event-end e)) 900 (posn-set-point (event-end e))
899 (if (hs-already-hidden-p) 901 (if (hs-already-hidden-p)