summaryrefslogtreecommitdiff
path: root/devdocs/elisp/mouse-menus.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/mouse-menus.html
new repository
Diffstat (limited to 'devdocs/elisp/mouse-menus.html')
-rw-r--r--devdocs/elisp/mouse-menus.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/elisp/mouse-menus.html b/devdocs/elisp/mouse-menus.html
new file mode 100644
index 00000000..4612c9d5
--- /dev/null
+++ b/devdocs/elisp/mouse-menus.html
@@ -0,0 +1,6 @@
+ <h4 class="subsection">Menus and the Mouse</h4> <p>The usual way to make a menu keymap produce a menu is to make it the definition of a prefix key. (A Lisp program can explicitly pop up a menu and receive the user’s choice—see <a href="pop_002dup-menus">Pop-Up Menus</a>.) </p> <p>If the prefix key ends with a mouse event, Emacs handles the menu keymap by popping up a visible menu, so that the user can select a choice with the mouse. When the user clicks on a menu item, the event generated is whatever character or symbol has the binding that brought about that menu item. (A menu item may generate a series of events if the menu has multiple levels or comes from the menu bar.) </p> <p>It’s often best to use a button-down event to trigger the menu. Then the user can select a menu item by releasing the button. </p> <p>If the menu keymap contains a binding to a nested keymap, the nested keymap specifies a <em>submenu</em>. There will be a menu item, labeled by the nested keymap’s item string, and clicking on this item automatically pops up the specified submenu. As a special exception, if the menu keymap contains a single nested keymap and no other menu items, the menu shows the contents of the nested keymap directly, not as a submenu. </p> <p>However, if Emacs is compiled without X toolkit support, or on text terminals, submenus are not supported. Each nested keymap is shown as a menu item, but clicking on it does not automatically pop up the submenu. If you wish to imitate the effect of submenus, you can do that by giving a nested keymap an item string which starts with ‘<samp>@</samp>’. This causes Emacs to display the nested keymap using a separate <em>menu pane</em>; the rest of the item string after the ‘<samp>@</samp>’ is the pane label. If Emacs is compiled without X toolkit support, or if a menu is displayed on a text terminal, menu panes are not used; in that case, a ‘<samp>@</samp>’ at the beginning of an item string is omitted when the menu label is displayed, and has no other effect. </p><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Mouse-Menus.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Mouse-Menus.html</a>
+ </p>
+</div>