]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix mouse-1 on `C-h b' buttons
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 2 Nov 2021 02:50:36 +0000 (03:50 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 2 Nov 2021 02:50:36 +0000 (03:50 +0100)
* lisp/outline.el (outline--make-button-overlay): Make mouse-1
work on the buttons.

lisp/outline.el

index 8dffca756fc862dceec7ad7d0425c34ea199a10c..1ff0a5a34e567f084228a95d6f7b183a8f4e04bb 100644 (file)
@@ -971,6 +971,8 @@ If non-nil, EVENT should be a mouse event."
                      (overlays-at (point)))))
     (unless o
       (setq o (make-overlay (point) (1+ (point))))
+      (overlay-put o 'follow-link 'mouse-face)
+      (overlay-put o 'mouse-face 'highlight)
       (overlay-put o 'outline-button t))
     (overlay-put o 'display (outline--make-button type))
     o))
@@ -984,7 +986,6 @@ If non-nil, EVENT should be a mouse event."
                    (define-keymap
                      :parent outline-minor-mode-cycle-map
                      ["RET"] #'outline-hide-subtree
-                     ["<follow-link>"] 'mouse-face
                      ["<mouse-2>"] #'outline-hide-subtree)))))
 
 (defun outline--insert-close-button ()
@@ -996,7 +997,6 @@ If non-nil, EVENT should be a mouse event."
                    (define-keymap
                      :parent outline-minor-mode-cycle-map
                      ["RET"] #'outline-show-subtree
-                     ["<follow-link>"] 'mouse-face
                      ["<mouse-2>"] #'outline-show-subtree)))))
 
 (defun outline--fix-up-all-buttons ()