summaryrefslogtreecommitdiff
path: root/lisp/menu-bar.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2021-09-22 20:08:45 +0300
committerJuri Linkov <juri@linkov.net>2021-09-22 20:08:45 +0300
commitac6afe9c3386c126b819ff8447b04329ec4b4204 (patch)
tree2d980440e1e72abc90f060f36d437c8ed044999a /lisp/menu-bar.el
parent2386b085268af9c06aebc5c4aced1aa6a0d3f702 (diff)
downloademacs-ac6afe9c3386c126b819ff8447b04329ec4b4204.tar.gz
emacs-ac6afe9c3386c126b819ff8447b04329ec4b4204.tar.bz2
emacs-ac6afe9c3386c126b819ff8447b04329ec4b4204.zip
Many improvements for Context Menus (bug#9054)
* lisp/menu-bar.el (menu-bar-showhide-menu): Add "Context Menus". * lisp/mouse.el (context-menu-undo): Add "in Region" to the titles when the region is active. (context-menu-region): Use 'mouse-yank-from-menu' in menu items created from 'yank-menu' for submenu "Paste from Kill Menu". (context-menu-region): Add submenu "Select" with things to mark. (mark-thing-at-mouse, mouse-yank-from-menu): New functions. * lisp/thingatpt.el (bounds-of-thing-at-mouse): New function. * lisp/progmodes/elisp-mode.el (elisp-context-menu): * lisp/progmodes/prog-mode.el (prog-context-menu): Use full symbol/identifier names in :help strings. Suggested by Martin Rudalics <rudalics@gmx.at>
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r--lisp/menu-bar.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index d863f34df1c..07f7beb92c8 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1315,6 +1315,11 @@ mail status in mode line"))
:visible (and (display-graphic-p) (fboundp 'x-show-tip))
:button (:toggle . tooltip-mode)))
+ (bindings--define-key menu [showhide-context-menu]
+ '(menu-item "Context Menus" context-menu-mode
+ :help "Turn mouse-3 context menus on/off"
+ :button (:toggle . context-menu-mode)))
+
(bindings--define-key menu [menu-bar-mode]
'(menu-item "Menu Bar" toggle-menu-bar-mode-from-frame
:help "Turn menu bar on/off"