aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 @@
62 (while menu-items 62 (while menu-items
63 (let* ((item (car menu-items)) 63 (let* ((item (car menu-items))
64 (callback (if (vectorp item) (aref item 1))) 64 (callback (if (vectorp item) (aref item 1)))
65 command enabler name) 65 command name)
66 (cond ((stringp item) 66 (cond ((stringp item)
67 (setq command nil) 67 (setq command nil)
68 (setq name (if (string-match "^-+$" item) "" item))) 68 (setq name (if (string-match "^-+$" item) "" item)))
@@ -72,11 +72,8 @@
72 ((vectorp item) 72 ((vectorp item)
73 (setq command (make-symbol (format "menu-function-%d" 73 (setq command (make-symbol (format "menu-function-%d"
74 add-menu-item-count))) 74 add-menu-item-count)))
75 (setq enabler (make-symbol (format "menu-function-%d-enabler"
76 add-menu-item-count)))
77 (setq add-menu-item-count (1+ add-menu-item-count)) 75 (setq add-menu-item-count (1+ add-menu-item-count))
78 (put command 'menu-enable enabler) 76 (put command 'menu-enable (aref item 2))
79 (set enabler (aref item 2))
80 (setq name (aref item 0)) 77 (setq name (aref item 0))
81 (if (symbolp callback) 78 (if (symbolp callback)
82 (fset command callback) 79 (fset command callback)
@@ -421,7 +418,7 @@ MENU-ITEMS is a list of menu item descriptions.
421 Each menu item should be a vector of three elements: 418 Each menu item should be a vector of three elements:
422 - a string, the name of the menu item; 419 - a string, the name of the menu item;
423 - a symbol naming a command, or a form to evaluate; 420 - a symbol naming a command, or a form to evaluate;
424 - and t or nil, whether this item is selectable. 421 - and a form whose value determines whether this item is selectable.
425BEFORE, if provided, is the name of a menu before which this menu should 422BEFORE, if provided, is the name of a menu before which this menu should
426 be added, if this menu is not on its parent already. If the menu is already 423 be added, if this menu is not on its parent already. If the menu is already
427 present, it will not be moved." 424 present, it will not be moved."