aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Téchoueyres2018-10-10 20:08:05 +0200
committerEli Zaretskii2018-11-03 10:58:57 +0200
commit4eb0e4266f7df67439996ff420a13eb7ba2e137a (patch)
treed9955279b2b1f1f493c2f8f6655ff120beca6418
parent9aa6861b00645e8365c3249087cc22a42e8fc82b (diff)
downloademacs-4eb0e4266f7df67439996ff420a13eb7ba2e137a.tar.gz
emacs-4eb0e4266f7df67439996ff420a13eb7ba2e137a.zip
'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.
-rw-r--r--etc/NEWS9
-rw-r--r--lisp/mouse.el5
2 files changed, 12 insertions, 2 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 8d413cccd49..4f0125c1734 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -864,11 +864,18 @@ UUID at point.
864 864
865 865
866** Interactive automatic highlighting 866** Interactive automatic highlighting
867
868+++ 867+++
869*** 'highlight-regexp' can now highlight subexpressions. 868*** 'highlight-regexp' can now highlight subexpressions.
870The now command accepts a prefix numeric argument to choose the 869The now command accepts a prefix numeric argument to choose the
871subexpression. 870subexpression.
871** Mouse display major mode menu
872+++
873*** 'minor-mode-menu-from-indicator' now display full minor mode.
874When there is no menu for a mode, display the mode name after the
875indicator instead of just the indicator (which is sometime cryptic).
876Ex:
877before : SP
878now : SP - Smartparens Mode
872 879
873 880
874* New Modes and Packages in Emacs 27.1 881* New Modes and Packages in Emacs 27.1
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'."
171 (mouse-menu-non-singleton menu) 171 (mouse-menu-non-singleton menu)
172 (if (fboundp mm-fun) ; bug#20201 172 (if (fboundp mm-fun) ; bug#20201
173 `(keymap 173 `(keymap
174 ,indicator 174 ,(format "%s - %s" indicator
175 (capitalize
176 (replace-regexp-in-string
177 "-" " " (format "%S" minor-mode))))
175 (turn-off menu-item "Turn off minor mode" ,mm-fun) 178 (turn-off menu-item "Turn off minor mode" ,mm-fun)
176 (help menu-item "Help for minor mode" 179 (help menu-item "Help for minor mode"
177 (lambda () (interactive) 180 (lambda () (interactive)