[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 583ebfa414: * lisp/progmodes/hideshow.el (hs-toggle-hiding): Fi
From: |
Stefan Monnier |
Subject: |
emacs-28 583ebfa414: * lisp/progmodes/hideshow.el (hs-toggle-hiding): Fix `interactive` form |
Date: |
Sat, 24 Sep 2022 10:25:05 -0400 (EDT) |
branch: emacs-28
commit 583ebfa4148a817e144fe0f517e2ea81530f252c
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* 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.
---
lisp/progmodes/hideshow.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index f574ec84fb..4b23419764 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -740,6 +740,8 @@ and `case-fold-search' are both t."
(defun hs-already-hidden-p ()
"Return non-nil if point is in an already-hidden block, otherwise nil."
+ ;; FIXME: We should probably also consider ourselves "in" a hidden block
+ ;; when point is right at the edge after a hidden block (bug#52092).
(save-excursion
(let ((c-reg (hs-inside-comment-p)))
(if (and c-reg (nth 0 c-reg))
@@ -893,7 +895,7 @@ The hook `hs-hide-hook' is run; see `run-hooks'."
"Toggle hiding/showing of a block.
See `hs-hide-block' and `hs-show-block'.
Argument E should be the event that triggered this action."
- (interactive)
+ (interactive (list last-nonmenu-event))
(hs-life-goes-on
(posn-set-point (event-end e))
(if (hs-already-hidden-p)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 583ebfa414: * lisp/progmodes/hideshow.el (hs-toggle-hiding): Fix `interactive` form,
Stefan Monnier <=