[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4eb0e42: 'minor-mode-menu-from-indicator' now displ
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 4eb0e42: 'minor-mode-menu-from-indicator' now display full minor mode. |
Date: |
Sat, 3 Nov 2018 05:00:33 -0400 (EDT) |
branch: master
commit 4eb0e4266f7df67439996ff420a13eb7ba2e137a
Author: Pierre Téchoueyres <address@hidden>
Commit: Eli Zaretskii <address@hidden>
'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.
---
etc/NEWS | 9 ++++++++-
lisp/mouse.el | 5 ++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 8d413cc..4f0125c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -864,11 +864,18 @@ UUID at point.
** Interactive automatic highlighting
-
+++
*** 'highlight-regexp' can now highlight subexpressions.
The now command accepts a prefix numeric argument to choose the
subexpression.
+** Mouse display major mode menu
++++
+*** '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
* New Modes and Packages in Emacs 27.1
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 7efe751..ca61e36 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4eb0e42: 'minor-mode-menu-from-indicator' now display full minor mode.,
Eli Zaretskii <=