aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsmenu.m58
1 files changed, 33 insertions, 25 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index d8dad3e28f8..9d17da43596 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1860,7 +1860,7 @@ void process_dialog (id window, Lisp_Object list)
1860 ========================================================================== */ 1860 ========================================================================== */
1861 1861
1862DEFUN ("ns-reset-menu", Fns_reset_menu, Sns_reset_menu, 0, 0, 0, 1862DEFUN ("ns-reset-menu", Fns_reset_menu, Sns_reset_menu, 0, 0, 0,
1863 "Cause the NS menu to be re-calculated.") 1863 doc: /* Cause the NS menu to be re-calculated. */)
1864 () 1864 ()
1865{ 1865{
1866 set_frame_menubar (SELECTED_FRAME (), 1, 0); 1866 set_frame_menubar (SELECTED_FRAME (), 1, 0);
@@ -1869,30 +1869,38 @@ DEFUN ("ns-reset-menu", Fns_reset_menu, Sns_reset_menu, 0, 0, 0,
1869 1869
1870 1870
1871DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, 1871DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0,
1872 "Pop up a deck-of-cards menu and return user's selection.\n\ 1872 doc: /* Pop up a deck-of-cards menu and return user's selection.
1873POSITION is a position specification. This is either a mouse button event\n\ 1873POSITION is a position specification. This is either a mouse button event
1874or a list ((XOFFSET YOFFSET) WINDOW)\n\ 1874or a list ((XOFFSET YOFFSET) WINDOW)
1875where XOFFSET and YOFFSET are positions in pixels from the top left\n\ 1875where XOFFSET and YOFFSET are positions in pixels from the top left
1876corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.)\n\ 1876corner of WINDOW. (WINDOW may be a window or a frame object.)
1877This controls the position of the center of the first line\n\ 1877This controls the position of the top left of the menu as a whole.
1878in the first pane of the menu, not the top left of the menu as a whole.\n\ 1878If POSITION is t, it means to use the current mouse position.
1879\n\ 1879
1880MENU is a specifier for a menu. For the simplest case, MENU is a keymap.\n\ 1880MENU is a specifier for a menu. For the simplest case, MENU is a keymap.
1881The menu items come from key bindings that have a menu string as well as\n\ 1881The menu items come from key bindings that have a menu string as well as
1882a definition; actually, the \"definition\" in such a key binding looks like\n\ 1882a definition; actually, the \"definition\" in such a key binding looks like
1883\(STRING . REAL-DEFINITION). To give the menu a title, put a string into\n\ 1883\(STRING . REAL-DEFINITION). To give the menu a title, put a string into
1884the keymap as a top-level element.\n\n\ 1884the keymap as a top-level element.
1885You can also use a list of keymaps as MENU.\n\ 1885
1886 Then each keymap makes a separate pane.\n\ 1886If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.
1887When MENU is a keymap or a list of keymaps, the return value\n\ 1887Otherwise, REAL-DEFINITION should be a valid key binding definition.
1888is a list of events.\n\n\ 1888
1889Alternatively, you can specify a menu of multiple panes\n\ 1889You can also use a list of keymaps as MENU.
1890 with a list of the form (TITLE PANE1 PANE2...),\n\ 1890 Then each keymap makes a separate pane.
1891where each pane is a list of form (TITLE ITEM1 ITEM2...).\n\ 1891
1892Each ITEM is normally a cons cell (STRING . VALUE);\n\ 1892When MENU is a keymap or a list of keymaps, the return value is the
1893but a string can appear as an item--that makes a nonselectable line\n\ 1893list of events corresponding to the user's choice. Note that
1894in the menu.\n\ 1894`x-popup-menu' does not actually execute the command bound to that
1895With this form of menu, the return value is VALUE from the chosen item.") 1895sequence of events.
1896
1897Alternatively, you can specify a menu of multiple panes
1898 with a list of the form (TITLE PANE1 PANE2...),
1899where each pane is a list of form (TITLE ITEM1 ITEM2...).
1900Each ITEM is normally a cons cell (STRING . VALUE);
1901but a string can appear as an item--that makes a nonselectable line
1902in the menu.
1903With this form of menu, the return value is VALUE from the chosen item. */)
1896 (position, menu) 1904 (position, menu)
1897 Lisp_Object position, menu; 1905 Lisp_Object position, menu;
1898{ 1906{