]> git.eshelyaron.com Git - emacs.git/commitdiff
(make-lucid-menu-keymap-disable): New variable.
authorRichard M. Stallman <rms@gnu.org>
Sun, 18 Sep 1994 05:06:35 +0000 (05:06 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 18 Sep 1994 05:06:35 +0000 (05:06 +0000)
(make-lucid-menu-keymap): Use that when disabling item unconditionally.

lisp/emacs-lisp/lmenu.el

index 9d4855fcc1fdf4b460d2a2fb3cc825d6a535466c..8c152399a053fc23e16709ce6eba690dd658e4f7 100644 (file)
@@ -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"
                                                  add-menu-item-count)))
               (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)