Mercurial > emacs
changeset 8868:5eff9b0c1a43
(make-lucid-menu-keymap-disable): New variable.
(make-lucid-menu-keymap): Use that when disabling item unconditionally.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 18 Sep 1994 05:06:35 +0000 |
parents | 73a95a7efdce |
children | eff6c7e4e236 |
files | lisp/emacs-lisp/lmenu.el |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)