summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2021-07-28 19:40:23 +0300
committerJuri Linkov <juri@linkov.net>2021-07-28 19:40:23 +0300
commitee1887bf54e7091a382ad24691ce0f482c61d7ea (patch)
tree72a391ca9736e72d291f6b967b27d18091b05a47 /doc
parent2c2baa9d1231ad9e642e3a80fb1c641fdde71b33 (diff)
downloademacs-ee1887bf54e7091a382ad24691ce0f482c61d7ea.tar.gz
Improve :type of defcustom 'context-menu-functions' and add documentation.
* doc/emacs/frames.texi (Menu Mouse Clicks): Describe context-menu-mode and context-menu-functions instead of suggesting global-set-key. (Menu Bars): Mention context-menu-mode and context-menu-functions. * etc/NEWS: Add context-menu-mode and context-menu-functions. * lisp/mouse.el (context-menu-functions): Use :type with repeat/function-item. (context-menu-minor, context-menu-undo, context-menu-region) (context-menu-ffap): Improve docstrings displayed for function-item in defcustom of context-menu-functions.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/frames.texi25
1 files changed, 11 insertions, 14 deletions
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 70615f68ed8..e03fb95755b 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -366,20 +366,15 @@ This menu is for changing the default face within the window's buffer.
@xref{Text Scale}.
@end table
+@cindex context menu
+@findex context-menu-mode
+@vindex context-menu-functions
+@kindex Down-mouse-3
Some graphical applications use @kbd{mouse-3} for a mode-specific
-menu. If you prefer @kbd{mouse-3} in Emacs to bring up such a menu
-instead of running the @code{mouse-save-then-kill} command, rebind
-@kbd{mouse-3} by adding the following line to your init file
-(@pxref{Init Rebinding}):
-
-@smallexample
-(global-set-key [mouse-3]
- '(menu-item "Menu Bar" ignore
- :filter (lambda (_)
- (if (zerop (or (frame-parameter nil 'menu-bar-lines) 0))
- (mouse-menu-bar-map)
- (mouse-menu-major-mode-map)))))
-@end smallexample
+menu. If you prefer @kbd{mouse-3} in Emacs to bring up such a context
+menu instead of running the @code{mouse-save-then-kill} command,
+enable @code{context-menu-mode} and customize the variable
+@code{context-menu-functions}.
@node Mode Line Mouse
@section Mode Line Mouse Commands
@@ -1217,7 +1212,9 @@ the use of menu bars at startup, customize the variable
terminals, where this makes one additional line available for text.
If the menu bar is off, you can still pop up a menu of its contents
with @kbd{C-mouse-3} on a display which supports pop-up menus.
-@xref{Menu Mouse Clicks}.
+Or you can enable @code{context-menu-mode} and customize the variable
+@code{context-menu-functions} to pop up a context menu with
+@kbd{mouse-3}. @xref{Menu Mouse Clicks}.
@xref{Menu Bar}, for information on how to invoke commands with the
menu bar. @xref{X Resources}, for how to customize the menu bar