Commit 1c45ffdf authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(make-lucid-menu-keymap-disable): New variable.

(make-lucid-menu-keymap): Use that when disabling item unconditionally.
parent bbea4f40
......@@ -52,6 +52,9 @@
(defvar add-menu-item-count 0)
;; This is a variable whose value is always nil.
(defvar make-lucid-menu-keymap-disable nil)
;; Return a menu keymap corresponding to a Lucid-style menu list
;; MENU-ITEMS, and with name MENU-NAME.
(defun make-lucid-menu-keymap (menu-name menu-items)
......@@ -73,7 +76,9 @@
(setq command (make-symbol (format "menu-function-%d"
(setq add-menu-item-count (1+ add-menu-item-count))
(put command 'menu-enable (aref item 2))
(if (aref item 2)
(put command 'menu-enable (aref item 2))
(put command 'menu-enable 'make-lucid-menu-keymap-disable))
(setq name (aref item 0))
(if (symbolp callback)
(fset command callback)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment