From 1c45ffdf8add1643fbf21f4750716b348a644727 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 18 Sep 1994 05:06:35 +0000 Subject: [PATCH] (make-lucid-menu-keymap-disable): New variable. (make-lucid-menu-keymap): Use that when disabling item unconditionally. --- lisp/emacs-lisp/lmenu.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el index 9d4855fcc1f..8c152399a05 100644 --- a/lisp/emacs-lisp/lmenu.el +++ b/lisp/emacs-lisp/lmenu.el @@ -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) -- 2.39.5