summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lmenu.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-28 21:54:36 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-28 21:54:36 +0000
commit705070f8eaf9728075a4cb18bcfa44447915cb00 (patch)
tree2fb0b9c1500fa71ae46b5e0e8582cbfa8218bf7b /lisp/emacs-lisp/lmenu.el
parent7dbb9ef58fa82a44a21eb8e53ebd697de6849013 (diff)
downloademacs-705070f8eaf9728075a4cb18bcfa44447915cb00.tar.gz
(make-lucid-menu-keymap): Allow any form as the enabler.
Diffstat (limited to 'lisp/emacs-lisp/lmenu.el')
-rw-r--r--lisp/emacs-lisp/lmenu.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el
index 44e176e1ffd..ee9417d01be 100644
--- a/lisp/emacs-lisp/lmenu.el
+++ b/lisp/emacs-lisp/lmenu.el
@@ -62,7 +62,7 @@
(while menu-items
(let* ((item (car menu-items))
(callback (if (vectorp item) (aref item 1)))
- command enabler name)
+ command name)
(cond ((stringp item)
(setq command nil)
(setq name (if (string-match "^-+$" item) "" item)))
@@ -72,11 +72,8 @@
((vectorp item)
(setq command (make-symbol (format "menu-function-%d"
add-menu-item-count)))
- (setq enabler (make-symbol (format "menu-function-%d-enabler"
- add-menu-item-count)))
(setq add-menu-item-count (1+ add-menu-item-count))
- (put command 'menu-enable enabler)
- (set enabler (aref item 2))
+ (put command 'menu-enable (aref item 2))
(setq name (aref item 0))
(if (symbolp callback)
(fset command callback)
@@ -421,7 +418,7 @@ MENU-ITEMS is a list of menu item descriptions.
Each menu item should be a vector of three elements:
- a string, the name of the menu item;
- a symbol naming a command, or a form to evaluate;
- - and t or nil, whether this item is selectable.
+ - and a form whose value determines whether this item is selectable.
BEFORE, if provided, is the name of a menu before which this menu should
be added, if this menu is not on its parent already. If the menu is already
present, it will not be moved."