diff options
author | Juri Linkov <juri@linkov.net> | 2022-11-23 10:50:23 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2022-11-23 10:50:23 +0200 |
commit | a142841ad1ee36d409d8fe5f6d9fbd5e87879b67 (patch) | |
tree | a88d7b0b28c682e70d9da8f5e4685f1e21964b91 /lisp/outline.el | |
parent | 3573ebfa6d94411257ffefdf9eb72f508dbe502c (diff) | |
download | emacs-a142841ad1ee36d409d8fe5f6d9fbd5e87879b67.tar.gz emacs-a142841ad1ee36d409d8fe5f6d9fbd5e87879b67.tar.bz2 emacs-a142841ad1ee36d409d8fe5f6d9fbd5e87879b67.zip |
* lisp/outline.el: 'S-<down-mouse-1>' on buffer buttons cycles all outlines.
(outline--create-button-icons, outline--insert-button): Bind 'S-<mouse-1>' to
'outline-cycle-buffer' as it's already done for buttons on the margins.
Ignore 'S-<down-mouse-1>'. Don't hard-code 'help-echo' since it should be
customizable by the ':help-echo' keyword in 'define-icon'.
Diffstat (limited to 'lisp/outline.el')
-rw-r--r-- | lisp/outline.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/outline.el b/lisp/outline.el index 2465a4963ab..86ac19aa415 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1777,7 +1777,12 @@ With a prefix argument, show headings up to that LEVEL." (propertize (icon-string icon-name) 'mouse-face 'default 'follow-link 'mouse-face - 'keymap (define-keymap "<mouse-2>" #'outline-cycle))) + 'keymap (define-keymap + "<mouse-2>" #'outline-cycle + ;; Need to override the global binding + ;; `mouse-appearance-menu' with <down->: + "S-<down-mouse-1>" #'ignore + "S-<mouse-1>" #'outline-cycle-buffer))) (list 'outline-open (if outline--use-rtl 'outline-close-rtl 'outline-close)))))) @@ -1805,10 +1810,11 @@ With a prefix argument, show headings up to that LEVEL." (overlay-put o 'mouse-face 'highlight) (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle - "<mouse-2>" #'outline-cycle)) - (overlay-put o 'help-echo (if (eq type 'close) - "Click to show" - "Click to hide"))) + "<mouse-2>" #'outline-cycle + ;; Need to override the global binding + ;; `mouse-appearance-menu' with <down->: + "S-<down-mouse-1>" #'ignore + "S-<mouse-1>" #'outline-cycle-buffer))) ('in-margins (overlay-put o 'before-string icon) (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle))) |