diff options
| author | Pierre Téchoueyres | 2018-10-10 20:08:05 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-11-03 10:58:57 +0200 |
| commit | 4eb0e4266f7df67439996ff420a13eb7ba2e137a (patch) | |
| tree | d9955279b2b1f1f493c2f8f6655ff120beca6418 | |
| parent | 9aa6861b00645e8365c3249087cc22a42e8fc82b (diff) | |
| download | emacs-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/NEWS | 9 | ||||
| -rw-r--r-- | lisp/mouse.el | 5 |
2 files changed, 12 insertions, 2 deletions
| @@ -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. |
| 870 | The now command accepts a prefix numeric argument to choose the | 869 | The now command accepts a prefix numeric argument to choose the |
| 871 | subexpression. | 870 | subexpression. |
| 871 | ** Mouse display major mode menu | ||
| 872 | +++ | ||
| 873 | *** 'minor-mode-menu-from-indicator' now display full minor mode. | ||
| 874 | When there is no menu for a mode, display the mode name after the | ||
| 875 | indicator instead of just the indicator (which is sometime cryptic). | ||
| 876 | Ex: | ||
| 877 | before : SP | ||
| 878 | now : 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) |