summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorPierre Téchoueyres <pierre.techoueyres@free.fr>2018-10-10 20:08:05 +0200
committerEli Zaretskii <eliz@gnu.org>2018-11-03 10:58:57 +0200
commit4eb0e4266f7df67439996ff420a13eb7ba2e137a (patch)
treed9955279b2b1f1f493c2f8f6655ff120beca6418 /lisp/mouse.el
parent9aa6861b00645e8365c3249087cc22a42e8fc82b (diff)
downloademacs-4eb0e4266f7df67439996ff420a13eb7ba2e137a.tar.gz
'minor-mode-menu-from-indicator' now display full minor mode.
When there is no menu for a mode, display the mode name after the indicator instead of just the indicator (which is sometime cryptic). Ex: before : SP now : SP - Smartparens Mode * etc/NEWS: Add en entry for this new feature. * lisp/mouse.el (minor-mode-menu-from-indicator): Append the mode name after the indicator when there is no menu defined by the mode.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 7efe751ab6b..ca61e364407 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -171,7 +171,10 @@ items `Turn Off' and `Help'."
(mouse-menu-non-singleton menu)
(if (fboundp mm-fun) ; bug#20201
`(keymap
- ,indicator
+ ,(format "%s - %s" indicator
+ (capitalize
+ (replace-regexp-in-string
+ "-" " " (format "%S" minor-mode))))
(turn-off menu-item "Turn off minor mode" ,mm-fun)
(help menu-item "Help for minor mode"
(lambda () (interactive)