# HG changeset patch # User Richard M. Stallman # Date 779864795 0 # Node ID 5eff9b0c1a4345f44763d900ced7c877eed12947 # Parent 73a95a7efdcec0f4768925802cba2c87e70b141c (make-lucid-menu-keymap-disable): New variable. (make-lucid-menu-keymap): Use that when disabling item unconditionally. diff -r 73a95a7efdce -r 5eff9b0c1a43 lisp/emacs-lisp/lmenu.el --- a/lisp/emacs-lisp/lmenu.el Sun Sep 18 04:05:03 1994 +0000 +++ b/lisp/emacs-lisp/lmenu.el Sun Sep 18 05:06:35 1994 +0000 @@ -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)