>From 8ccd620d2891eee0ec1910a002adca0ab657f7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= Date: Wed, 10 Oct 2018 20:08:05 +0200 Subject: [PATCH] '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 ee74e86f40..739674cf3e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -824,11 +824,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 cb63ca51c5..2aba9bf458 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -169,7 +169,10 @@ minor-mode-menu-from-indicator (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) -- 2.17.1