Mercurial > hg > xemacs-beta
comparison man/lispref/menus.texi @ 5706:44b0b4ea5cae
Implement and document :active keyword for submenu specs.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Fri, 28 Dec 2012 17:23:25 +0900 |
parents | 6b027725e340 |
children | 8ca881999349 |
comparison
equal
deleted
inserted
replaced
5705:9c9b07d40f20 | 5706:44b0b4ea5cae |
---|---|
37 except in the case of the top level pop-up menu, where there is no | 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 | 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}. | 39 menu if @code{popup-menu-titles} is non-@code{nil}. |
40 | 40 |
41 Immediately following the first element there may optionally be up | 41 Immediately following the first element there may optionally be up |
42 to four keyword-value pairs, as follows: | 42 to five keyword-value pairs, as follows: |
43 | 43 |
44 @table @code | 44 @table @code |
45 @item :included @var{form} | 45 @item :included @var{form} |
46 This can be used to control the visibility of a menu. The form is | 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}. | 47 evaluated and the menu will be omitted if the result is @code{nil}. |
62 filter function should have no side-effects. | 62 filter function should have no side-effects. |
63 | 63 |
64 @item :accelerator @var{key} | 64 @item :accelerator @var{key} |
65 A menu accelerator is a keystroke which can be pressed while the menu is | 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 | 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}. | 67 or the symbol name of a key. |
68 | |
69 @item :active @var{form} | |
70 @var{form} will be evaluated when the submenu is about to be displayed, | |
71 and the menu contents will be displayed only if the result is non-@code{nil}. | |
72 If the submenu is inactive, it will display the word "Invalid", grayed-out. | |
73 @xref{Menu Accelerators}. | |
68 @end table | 74 @end table |
69 | 75 |
70 The rest of the menu consists of elements as follows: | 76 The rest of the menu consists of elements as follows: |
71 | 77 |
72 @itemize @bullet | 78 @itemize @bullet |