2 @c This is part of the XEmacs Lisp Reference Manual.
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
4 @c Copyright (C) 1995 Sun Microsystems.
5 @c See the file lispref.texi for copying conditions.
6 @setfilename ../../info/menu.info
7 @node Menus, Dialog Boxes, Keymaps, Top
12 * Menu Format:: Format of a menu description.
13 * Menubar Format:: How to specify a menubar.
14 * Menubar:: Functions for controlling the menubar.
15 * Modifying Menus:: Modifying a menu description.
16 * Pop-Up Menus:: Functions for specifying pop-up menus.
17 * Menu Filters:: Filter functions for the default menubar.
18 * Menu Accelerators:: Using and controlling menu accelerator keys
19 * Buffers Menu:: The menu that displays the list of buffers.
23 @section Format of Menus
25 @cindex format of menus
27 A menu is described using a @dfn{menu description}, which is a list of
28 menu items, keyword-value pairs, strings, and submenus. The menu
29 description specifies which items are present in the menu, what function
30 each item invokes, and whether the item is selectable or not. Pop-up
31 menus are directly described with a menu description, while menubars are
32 described slightly differently (see below).
34 The first element of a menu must be a string, which is the name of the
35 menu. This is the string that will be displayed in the parent menu or
36 menubar, if any. This string is not displayed in the menu itself,
37 except in the case of the top level pop-up menu, where there is no
38 parent. In this case, the string will be displayed at the top of the
39 menu if @code{popup-menu-titles} is non-@code{nil}.
41 Immediately following the first element there may optionally be up
42 to four keyword-value pairs, as follows:
45 @item :included @var{form}
46 This can be used to control the visibility of a menu. The form is
47 evaluated and the menu will be omitted if the result is @code{nil}.
49 @item :config @var{symbol}
50 This is an efficient shorthand for @code{:included (memq @var{symbol}
51 menubar-configuration)}. See the variable @code{menubar-configuration}.
53 @item :filter @var{function}
54 A menu filter is used to sensitize or incrementally create a submenu
55 only when it is selected by the user and not every time the menubar is
56 activated. The filter function is passed the list of menu items in the
57 submenu and must return a list of menu items to be used for the menu.
58 It is called only when the menu is about to be displayed, so other menus
59 may already be displayed. Vile and terrible things will happen if a
60 menu filter function changes the current buffer, window, or frame. It
61 also should not raise, lower, or iconify any frames. Basically, the
62 filter function should have no side-effects.
64 @item :accelerator @var{key}
65 A menu accelerator is a keystroke which can be pressed while the menu is
66 visible which will immediately activate the item. @var{key} must be a char
67 or the symbol name of a key. @xref{Menu Accelerators}.
70 The rest of the menu consists of elements as follows:
74 A @dfn{menu item}, which is a vector in the following form:
77 @code{[ @var{name} @var{callback} @var{:keyword} @var{value} @var{:keyword} @var{value} ... ]}
80 @var{name} is a string, the name of the menu item; it is the string to
81 display on the menu. It is filtered through the resource database, so
82 it is possible for resources to override what string is actually
85 @var{callback} is a form that will be invoked when the menu item is
86 selected. If the callback of a menu item is a symbol, then it must name
87 a command. It will be invoked with @code{call-interactively}. If it is
88 a list, then it is evaluated with @code{eval}.
90 The valid keywords and their meanings are described below.
92 Note that for compatibility purposes, the form
95 @code{[ @var{name} @var{callback} @var{active-p} ]}
98 is also accepted and is equivalent to
101 @code{[ @var{name} @var{callback} :active @var{active-p} ]}
107 @code{[ @var{name} @var{callback} @var{active-p} @var{suffix}]}
110 is accepted and is equivalent to
113 @code{[ @var{name} @var{callback} :active @var{active-p} :suffix @var{suffix}]}
116 However, these older forms are deprecated and should generally not be used.
119 If an element of a menu is a string, then that string will be presented
120 in the menu as unselectable text.
123 If an element of a menu is a string consisting solely of hyphens, then
124 that item will be presented as a solid horizontal line.
127 If an element of a menu is a string beginning with @samp{--:}, then
128 a particular sort of horizontal line will be displayed, as follows:
131 @item "--:singleLine"
132 A solid horizontal line. This is equivalent to a string consisting
134 @item "--:doubleLine"
135 A solid double horizontal line.
136 @item "--:singleDashedLine"
137 A dashed horizontal line.
138 @item "--:doubleDashedLine"
139 A dashed double horizontal line.
141 No line (but a small space is left).
142 @item "--:shadowEtchedIn"
143 A solid horizontal line with a 3-d recessed appearance.
144 @item "--:shadowEtchedOut"
145 A solid horizontal line with a 3-d pushed-out appearance.
146 @item "--:shadowDoubleEtchedIn"
147 A solid double horizontal line with a 3-d recessed appearance.
148 @item "--:shadowDoubleEtchedOut"
149 A solid double horizontal line with a 3-d pushed-out appearance.
150 @item "--:shadowEtchedInDash"
151 A dashed horizontal line with a 3-d recessed appearance.
152 @item "--:shadowEtchedOutDash"
153 A dashed horizontal line with a 3-d pushed-out appearance.
154 @item "--:shadowDoubleEtchedInDash"
155 A dashed double horizontal line with a 3-d recessed appearance.
156 @item "--:shadowDoubleEtchedOutDash"
157 A dashed double horizontal line with a 3-d pushed-out appearance.
161 If an element of a menu is a list, it is treated as a submenu. The name
162 of that submenu (the first element in the list) will be used as the name
163 of the item representing this menu on the parent.
166 The possible keywords are as follows:
169 @item :active @var{form}
170 @var{form} will be evaluated when the menu that this item is a part of
171 is about to be displayed, and the item will be selectable only if the
172 result is non-@code{nil}. If the item is unselectable, it will
173 usually be displayed grayed-out to indicate this.
175 @item :suffix @var{form}
176 @var{form} will be evaluated when the menu that this item is a part of
177 is about to be displayed, and the resulting string is appended to the
178 displayed name. This provides a convenient way of adding the name of a
179 command's ``argument'' to the menu, like @samp{Kill Buffer NAME}.
181 @item :keys @var{string}
182 Normally, the keyboard equivalents of commands in menus are displayed
183 when the ``callback'' is a symbol. This can be used to specify keys for
184 more complex menu items. It is passed through
185 @code{substitute-command-keys} first.
187 @item :style @var{style}
188 Specifies what kind of object this menu item is. @var{style} be one
202 The only difference between toggle and radio buttons is how they are
203 displayed. But for consistency, a toggle button should be used when
204 there is one option whose value can be turned on or off, and radio
205 buttons should be used when there is a set of mutually exclusive options.
206 When using a group of radio buttons, you should arrange for no more than
207 one to be marked as selected at a time.
209 @item :selected @var{form}
210 Meaningful only when @var{style} is @code{toggle}, @code{radio} or
211 @code{button}. This specifies whether the button will be in the
212 selected or unselected state. @var{form} is evaluated, as for
215 @item :included @var{form}
216 This can be used to control the visibility of a menu item. The form is
217 evaluated and the menu item is only displayed if the result is
218 non-@code{nil}. Note that this is different from @code{:active}: If
219 @code{:active} evaluates to @code{nil}, the item will be displayed
220 grayed out, while if @code{:included} evaluates to @code{nil}, the item
221 will be omitted entirely.
223 @item :config @var{symbol}
224 This is an efficient shorthand for @code{:included (memq @var{symbol}
225 menubar-configuration)}. See the variable @code{menubar-configuration}.
227 @item :accelerator @var{key}
228 A menu accelerator is a keystroke which can be pressed while the menu is
229 visible which will immediately activate the item. @var{key} must be a char
230 or the symbol name of a key. @xref{Menu Accelerators}.
233 @defvar menubar-configuration
234 This variable holds a list of symbols, against which the value of the
235 @code{:config} tag for each menubar item will be compared. If a menubar
236 item has a @code{:config} tag, then it is omitted from the menubar if
237 that tag is not a member of the @code{menubar-configuration} list.
244 :filter file-menu-filter ; file-menu-filter is a function that takes
245 ; one argument (a list of menu items) and
246 ; returns a list of menu items
247 [ "Save As..." write-file]
248 [ "Revert Buffer" revert-buffer :active (buffer-modified-p) ]
249 [ "Read Only" toggle-read-only :style toggle :selected buffer-read-only ]
254 @section Format of the Menubar
255 @cindex menubar format
256 @cindex format of the menubar
258 A menubar is a list of menus, menu items, and strings. The format is
259 similar to that of a menu, except:
263 The first item need not be a string, and is not treated specially.
266 A string consisting solely of hyphens is not treated specially.
269 If an element of a menubar is @code{nil}, then it is used to represent
270 the division between the set of menubar items which are flush-left and
271 those which are flush-right. (Note: this isn't completely implemented
279 @defvar current-menubar
280 This variable holds the description of the current menubar. This may be
281 buffer-local. When the menubar is changed, the function
282 @code{set-menubar-dirty-flag} has to be called in order for the menubar
283 to be updated on the screen.
286 @defvr Constant default-menubar
287 This variable holds the menubar description of the menubar that is
288 visible at startup. This is the value that @code{current-menubar}
292 @defun set-menubar-dirty-flag
293 This function tells XEmacs that the menubar widget has to be updated.
294 Changes to the menubar will generally not be visible until this function
298 The following convenience functions are provided for setting the
299 menubar. They are equivalent to doing the appropriate action to change
300 @code{current-menubar}, and then calling @code{set-menubar-dirty-flag}.
301 Note that these functions copy their argument using
302 @code{copy-sequence}.
304 @defun set-menubar menubar
305 This function sets the default menubar to be @var{menubar} (@pxref{Menu
306 Format}). This is the menubar that will be visible in buffers that
307 have not defined their own, buffer-local menubar.
310 @defun set-buffer-menubar menubar
311 This function sets the buffer-local menubar to be @var{menubar}. This
312 does not change the menubar in any buffers other than the current one.
317 @defvar menubar-show-keybindings
318 If true, the menubar will display keyboard equivalents. If false, only
319 the command names will be displayed.
322 @defvar activate-menubar-hook
323 Function or functions called before a menubar menu is pulled down.
324 These functions are called with no arguments, and should interrogate and
325 modify the value of @code{current-menubar} as desired.
327 The functions on this hook are invoked after the mouse goes down, but
328 before the menu is mapped, and may be used to activate, deactivate, add,
329 or delete items from the menus. However, using a filter (with the
330 @code{:filter} keyword in a menu description) is generally a more
331 efficient way of accomplishing the same thing, because the filter is
332 invoked only when the actual menu goes down. With a complex menu,
333 there can be a quite noticeable and sometimes aggravating delay if
334 all menu modification is implemented using the @code{activate-menubar-hook}.
337 These functions may return the symbol @code{t} to assert that they have
338 made no changes to the menubar. If any other value is returned, the
339 menubar is recomputed. If @code{t} is returned but the menubar has been
340 changed, then the changes may not show up right away. Returning
341 @code{nil} when the menubar has not changed is not so bad; more
342 computation will be done, but redisplay of the menubar will still be
346 @defvar menu-no-selection-hook
347 Function or functions to call when a menu or dialog box is dismissed
348 without a selection having been made.
351 @node Modifying Menus
352 @section Modifying Menus
354 The following functions are provided to modify the menubar of one of its
355 submenus. Note that these functions modify the menu in-place, rather
356 than copying it and making a new menu.
358 Some of these functions take a @dfn{menu path}, which is a list of
359 strings identifying the menu to be modified. For example,
360 @code{("File")} names the top-level ``File'' menu. @code{("File"
361 "Foo")} names a hypothetical submenu of ``File''.
363 Others take a @dfn{menu item path}, which is similar to a menu path but
364 also specifies a particular item to be modified. For example,
365 @code{("File" "Save")} means the menu item called ``Save'' under the
366 top-level ``File'' menu. @code{("Menu" "Foo" "Item")} means the menu
367 item called ``Item'' under the ``Foo'' submenu of ``Menu''.
369 @defun add-submenu menu-path submenu &optional before in-menu
370 This function adds a menu to the menubar or one of its submenus. If the
371 named menu exists already, it is changed.
373 @var{menu-path} identifies the menu under which the new menu should be
374 inserted. If @var{menu-path} is @code{nil}, then the menu will be added
375 to the menubar itself.
377 @var{submenu} is the new menu to add (@pxref{Menu Format}).
379 @var{before}, if provided, is the name of a menu before which this menu
380 should be added, if this menu is not on its parent already. If the menu
381 is already present, it will not be moved.
383 If @var{in-menu} is present use that instead of @code{current-menubar}
384 as the menu to change.
387 @defun add-menu-button menu-path menu-leaf &optional before in-menu
388 This function adds a menu item to some menu, creating the menu first if
389 necessary. If the named item exists already, it is changed.
391 @var{menu-path} identifies the menu under which the new menu item should
394 @var{menu-leaf} is a menubar leaf node (@pxref{Menu Format}).
396 @var{before}, if provided, is the name of a menu before which this item
397 should be added, if this item is not on the menu already. If the item
398 is already present, it will not be moved.
400 If @var{in-menu} is present use that instead of @code{current-menubar}
401 as the menu to change.
404 @defun delete-menu-item menu-item-path &optional from-menu
405 This function removes the menu item specified by @var{menu-item-path}
406 from the menu hierarchy.
408 If @var{from-menu} is present use that instead of @code{current-menubar}
409 as the menu to change.
412 @defun enable-menu-item menu-item-path
413 This function makes the menu item specified by @var{menu-item-path} be
417 @defun disable-menu-item menu-item-path
418 This function makes the menu item specified by @var{menu-item-path} be
422 @defun relabel-menu-item menu-item-path new-name
423 This function changes the string of the menu item specified by
424 @var{menu-item-path}. @var{new-name} is the string that the menu item
425 will be printed as from now on.
428 The following function can be used to search for a particular item in
429 a menubar specification, given a path to the item.
431 @defun find-menu-item menubar menu-item-path &optional parent
432 This function searches @var{menubar} for the item given by
433 @var{menu-item-path} starting from @var{parent} (@code{nil} means start
434 at the top of @var{menubar}). This function returns @code{(@var{item}
435 . @var{parent})}, where @var{parent} is the immediate parent of the item
436 found (a menu description), and @var{item} is either a vector, list, or
437 string, depending on the nature of the menu item.
439 This function signals an error if the item is not found.
442 The following deprecated functions are also documented, so that
443 existing code can be understood. You should not use these functions
446 @defun add-menu menu-path menu-name menu-items &optional before
447 This function adds a menu to the menubar or one of its submenus. If the
448 named menu exists already, it is changed. This is obsolete; use
449 @code{add-submenu} instead.
451 @var{menu-path} identifies the menu under which the new menu should be
452 inserted. If @var{menu-path} is @code{nil}, then the menu will be added
453 to the menubar itself.
455 @var{menu-name} is the string naming the menu to be added;
456 @var{menu-items} is a list of menu items, strings, and submenus. These
457 two arguments are the same as the first and following elements of a menu
458 description (@pxref{Menu Format}).
460 @var{before}, if provided, is the name of a menu before which this
461 menu should be added, if this menu is not on its parent already. If the
462 menu is already present, it will not be moved.
465 @defun add-menu-item menu-path item-name function enabled-p &optional before
466 This function adds a menu item to some menu, creating the menu first if
467 necessary. If the named item exists already, it is changed. This is
468 obsolete; use @code{add-menu-button} instead.
470 @var{menu-path} identifies the menu under which the new menu item should
471 be inserted. @var{item-name}, @var{function}, and @var{enabled-p} are
472 the first, second, and third elements of a menu item vector (@pxref{Menu
475 @var{before}, if provided, is the name of a menu item before which this
476 item should be added, if this item is not on the menu already. If the
477 item is already present, it will not be moved.
481 @section Menu Filters
484 The following filter functions are provided for use in
485 @code{default-menubar}. You may want to use them in your own menubar
488 @defun file-menu-filter menu-items
489 This function changes the arguments and sensitivity of these File menu items:
493 Has the name of the current buffer appended to it.
495 Has the name of the current buffer appended to it.
496 @item Pretty-Print Buffer
497 Has the name of the current buffer appended to it.
499 Has the name of the current buffer appended to it, and is sensitive only
500 when the current buffer is modified.
502 Has the name of the current buffer appended to it, and is sensitive only
503 when the current buffer has a file.
505 Sensitive only when there is more than one visible frame.
509 @defun edit-menu-filter menu-items
510 This function changes the arguments and sensitivity of these Edit menu items:
514 Sensitive only when XEmacs owns the primary X Selection (if
515 @code{zmacs-regions} is @code{t}, this is equivalent to saying that
516 there is a region selected).
518 Sensitive only when XEmacs owns the primary X Selection.
520 Sensitive only when XEmacs owns the primary X Selection.
522 Sensitive only when there is an owner for the X Clipboard Selection.
524 Sensitive only when there is undo information. While in the midst of an
525 undo, this is changed to @samp{Undo More}.
529 @defun buffers-menu-filter menu-items
530 This function sets up the Buffers menu. @xref{Buffers Menu}, for
535 @section Pop-Up Menus
538 @defun popup-menu menu-description &optional event
539 This function pops up a menu specified by @var{menu-description}, which
540 is a menu description (@pxref{Menu Format}). The menu is displayed at
541 the current mouse position.
544 @defun popup-menu-up-p
545 This function returns @code{t} if a pop-up menu is up, @code{nil}
549 @defvar popup-menu-titles
550 If true (the default), pop-up menus will have title bars at the top.
553 Some machinery is provided that attempts to provide a higher-level
554 mechanism onto pop-up menus. This only works if you do not redefine
555 the binding for button3.
557 @deffn Command popup-mode-menu
558 This function pops up a menu of global and mode-specific commands. The
559 menu is computed by combining @code{global-popup-menu} and
560 @code{mode-popup-menu}. This is the default binding for button3.
561 You should generally not change this binding.
564 @defvar global-popup-menu
565 This holds the global popup menu. This is present in all modes.
566 (This is @code{nil} by default.)
569 @defvar mode-popup-menu
570 The mode-specific popup menu. Automatically buffer local.
571 This is appended to the default items in @code{global-popup-menu}.
574 @defvr Constant default-popup-menu
575 This holds the default value of @code{mode-popup-menu}.
578 @defvar activate-popup-menu-hook
579 Function or functions run before a mode-specific popup menu is made
580 visible. These functions are called with no arguments, and should
581 interrogate and modify the value of @code{global-popup-menu} or
582 @code{mode-popup-menu} as desired. Note: this hook is only run if you
583 use @code{popup-mode-menu} for activating the global and mode-specific
584 commands; if you have your own binding for button3, this hook won't be
588 The following convenience functions are provided for displaying
591 @deffn Command popup-buffer-menu event
592 This function pops up a copy of the @samp{Buffers} menu (from the menubar)
593 where the mouse is clicked. It should be bound to a mouse button event.
596 @deffn Command popup-menubar-menu event
597 This function pops up a copy of menu that also appears in the menubar.
598 It should be bound to a mouse button event.
601 @node Menu Accelerators
602 @section Menu Accelerators
603 @cindex menu accelerators
604 @cindex keyboard menu accelerators
606 Menu accelerators are keyboard shortcuts for accessing the menubar.
607 Accelerator keys can be specified for menus as well as for menu items. An
608 accelerator key for a menu is used to activate that menu when it appears as a
609 submenu of another menu. An accelerator key for a menu item is used to
613 * Creating Menu Accelerators:: How to add accelerator keys to a menu.
614 * Keyboard Menu Traversal:: How to use and modify the keys which are used
615 to traverse the menu structure.
616 * Menu Accelerator Functions:: Functions for working with menu accelerators.
619 @node Creating Menu Accelerators
620 @subsection Creating Menu Accelerators
622 Menu accelerators are specified as part of the menubar format using the
623 :accelerator tag to specify a key or by placing "%_" in the menu or menu item
624 name prior to the letter which is to be used as the accelerator key. The
625 advantage of the second method is that the menu rendering code then knows to
626 draw an underline under that character, which is the canonical way of
627 indicating an accelerator key to a user.
629 For example, the command
632 (add-submenu nil '("%_Test"
633 ["One" (insert "1") :accelerator ?1 :active t]
634 ["%_Two" (insert "2")]
635 ["%_3" (insert "3")]))
638 will add a new menu to the top level menubar. The new menu can be reached
639 by pressing "t" while the top level menubar is active. When the menu is
640 active, pressing "1" will activate the first item and insert the character
641 "1" into the buffer. Pressing "2" will activate the second item and insert
642 the character "2" into the buffer. Pressing "3" will activate the third item
643 and insert the character "3" into the buffer.
645 It is possible to activate the top level menubar itself using accelerator keys.
646 @xref{Menu Accelerator Functions}.
648 @node Keyboard Menu Traversal
649 @subsection Keyboard Menu Traversal
651 In addition to immediately activating a menu or menu item, the keyboard can
652 be used to traverse the menus without activating items. The keyboard arrow
653 keys, the return key and the escape key are defined to traverse the menus in a
654 way that should be familiar to users of any of a certain family of popular PC
657 This behavior can be changed by modifying the bindings in
658 menu-accelerator-map. At this point, the online help is your best bet
659 for more information about how to modify the menu traversal keys.
661 @node Menu Accelerator Functions
662 @subsection Menu Accelerator Functions
664 @deffn Command accelerate-menu
665 Make the menubar immediately active and place the cursor on the left most entry
666 in the top level menu. Menu items can be selected as usual.
669 @defvar menu-accelerator-enabled
670 Whether menu accelerator keys can cause the menubar to become active.
672 If @code{menu-force} or @code{menu-fallback}, then menu accelerator keys can
673 be used to activate the top level menu. Once the menubar becomes active, the
674 accelerator keys can be used regardless of the value of this variable.
676 @code{menu-force} is used to indicate that the menu accelerator key takes
677 precedence over bindings in the current keymap(s). @code{menu-fallback} means
678 that bindings in the current keymap take precedence over menu accelerator keys.
679 Thus a top level menu with an accelerator of "T" would be activated on a
680 keypress of Meta-t if @code{menu-accelerator-enabled} is @code{menu-force}.
681 However, if @code{menu-accelerator-enabled} is @code{menu-fallback}, then
682 Meta-t will not activate the menubar and will instead run the function
683 transpose-words, to which it is normally bound.
685 The default value is @code{nil}.
687 See also @code{menu-accelerator-modifiers} and @code{menu-accelerator-prefix}.
690 @defvar menu-accelerator-map
691 Keymap consulted to determine the commands to run in response to keypresses
692 occurring while the menubar is active. @xref{Keyboard Menu Traversal}.
695 @defvar menu-accelerator-modifiers
696 A list of modifier keys which must be pressed in addition to a valid menu
697 accelerator in order for the top level menu to be activated in response to
698 a keystroke. The default value of @code{(meta)} mirrors the usage of the alt key
699 as a menu accelerator in popular PC operating systems.
701 The modifier keys in @code{menu-accelerator-modifiers} must match exactly the
702 modifiers present in the keypress. The only exception is that the shift
703 modifier is accepted in conjunction with alphabetic keys even if it is not a
704 menu accelerator modifier.
706 See also @code{menu-accelerator-enabled} and @code{menu-accelerator-prefix}.
709 @defvar menu-accelerator-prefix
710 Prefix key(s) that must be typed before menu accelerators will be activated.
711 Must be a valid key descriptor.
713 The default value is @code{nil}.
717 (setq menu-accelerator-prefix ?\C-x)
718 (setq menu-accelerator-modifiers '(meta control))
719 (setq menu-accelerator-enabled 'menu-force)
720 (add-submenu nil '("%_Test"
721 ["One" (insert "1") :accelerator ?1 :active t]
722 ["%_Two" (insert "2")]
723 ["%_3" (insert "3")]))
726 will add the menu "Test" to the top level menubar. Pressing C-x followed by
727 C-M-T will activate the menubar and display the "Test" menu. Pressing
728 C-M-T by itself will not activate the menubar. Neither will pressing C-x
729 followed by anything else.
732 @section Buffers Menu
735 The following options control how the @samp{Buffers} menu is displayed.
736 This is a list of all (or a subset of) the buffers currently in existence,
737 and is updated dynamically.
739 @defopt buffers-menu-max-size
740 This user option holds the maximum number of entries which may appear on
741 the @samp{Buffers} menu. If this is 10, then only the ten
742 most-recently-selected buffers will be shown. If this is @code{nil},
743 then all buffers will be shown. Setting this to a large number or
744 @code{nil} will slow down menu responsiveness.
747 @defun format-buffers-menu-line buffer
748 This function returns a string to represent @var{buffer} in the
749 @samp{Buffers} menu. @code{nil} means the buffer shouldn't be listed.
750 You can redefine this.
753 @defopt complex-buffers-menu-p
754 If true, the @samp{Buffers} menu will contain several commands, as submenus
755 of each buffer line. If this is false, then there will be only one command:
759 @defopt buffers-menu-switch-to-buffer-function
760 This user option holds the function to call to select a buffer from the
761 @samp{Buffers} menu. @code{switch-to-buffer} is a good choice, as is
762 @code{pop-to-buffer}.