]> git.eshelyaron.com Git - emacs.git/commitdiff
Re-fix the new mouse event logic in outline
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 31 Oct 2021 23:05:10 +0000 (00:05 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 31 Oct 2021 23:05:10 +0000 (00:05 +0100)
* lisp/outline.el (outline-show-subtree, outline-hide-subtree):
Really fix the mouse logic.

lisp/outline.el

index 12f6381139841b6613aea63c3ea3887c40d8ea9e..9058293e2776d938945e557041932b3149f2122b 100644 (file)
@@ -944,7 +944,7 @@ Note that this does not hide the lines preceding the first heading line."
   "Hide everything after this heading at deeper levels.
 If non-nil, EVENT should be a mouse event."
   (interactive (list last-nonmenu-event))
-  (when event
+  (when (mouse-event-p event)
     (mouse-set-point event))
   (when (and outline-minor-mode-use-buttons outline-minor-mode)
     (outline--insert-close-button))
@@ -1019,7 +1019,7 @@ If non-nil, EVENT should be a mouse event."
 (defun outline-show-subtree (&optional event)
   "Show everything after this heading at deeper levels."
   (interactive (list last-nonmenu-event))
-  (when event
+  (when (mouse-event-p event)
     (mouse-set-point event))
   (when (and outline-minor-mode-use-buttons outline-minor-mode)
     (outline--insert-open-button))