aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-11-02 03:50:36 +0100
committerLars Ingebrigtsen2021-11-02 03:50:36 +0100
commitec60aededdee0074ae35fc862cdd7ef8a689d757 (patch)
tree456abebc054a99e281154456c0326b69f4129515
parent8cb514f4a22f1d764bfc8252d7de681d048e9bae (diff)
downloademacs-ec60aededdee0074ae35fc862cdd7ef8a689d757.tar.gz
emacs-ec60aededdee0074ae35fc862cdd7ef8a689d757.zip
Fix mouse-1 on `C-h b' buttons
* lisp/outline.el (outline--make-button-overlay): Make mouse-1 work on the buttons.
-rw-r--r--lisp/outline.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/outline.el b/lisp/outline.el
index 8dffca756fc..1ff0a5a34e5 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -971,6 +971,8 @@ If non-nil, EVENT should be a mouse event."
971 (overlays-at (point))))) 971 (overlays-at (point)))))
972 (unless o 972 (unless o
973 (setq o (make-overlay (point) (1+ (point)))) 973 (setq o (make-overlay (point) (1+ (point))))
974 (overlay-put o 'follow-link 'mouse-face)
975 (overlay-put o 'mouse-face 'highlight)
974 (overlay-put o 'outline-button t)) 976 (overlay-put o 'outline-button t))
975 (overlay-put o 'display (outline--make-button type)) 977 (overlay-put o 'display (outline--make-button type))
976 o)) 978 o))
@@ -984,7 +986,6 @@ If non-nil, EVENT should be a mouse event."
984 (define-keymap 986 (define-keymap
985 :parent outline-minor-mode-cycle-map 987 :parent outline-minor-mode-cycle-map
986 ["RET"] #'outline-hide-subtree 988 ["RET"] #'outline-hide-subtree
987 ["<follow-link>"] 'mouse-face
988 ["<mouse-2>"] #'outline-hide-subtree))))) 989 ["<mouse-2>"] #'outline-hide-subtree)))))
989 990
990(defun outline--insert-close-button () 991(defun outline--insert-close-button ()
@@ -996,7 +997,6 @@ If non-nil, EVENT should be a mouse event."
996 (define-keymap 997 (define-keymap
997 :parent outline-minor-mode-cycle-map 998 :parent outline-minor-mode-cycle-map
998 ["RET"] #'outline-show-subtree 999 ["RET"] #'outline-show-subtree
999 ["<follow-link>"] 'mouse-face
1000 ["<mouse-2>"] #'outline-show-subtree))))) 1000 ["<mouse-2>"] #'outline-show-subtree)))))
1001 1001
1002(defun outline--fix-up-all-buttons () 1002(defun outline--fix-up-all-buttons ()