From b69f3ab1c817320aeb32496dc0170d518c1533d8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 7 Jan 1994 05:37:31 +0000 Subject: [PATCH] (make-lucid-menu-keymap): Allow multiple identical inactive strings. --- lisp/emacs-lisp/lmenu.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el index d06b4d56fee..55cef190538 100644 --- a/lisp/emacs-lisp/lmenu.el +++ b/lisp/emacs-lisp/lmenu.el @@ -79,8 +79,12 @@ (if (symbolp callback) (fset command callback) (fset command (list 'lambda () '(interactive) callback))))) - (if name - (define-key menu (vector (intern name)) (cons name command)))) + (if (null command) + ;; Handle inactive strings specially--allow any number + ;; of identical ones. + (setcdr menu (cons (list nil name) (cdr menu))) + (if name + (define-key menu (vector (intern name)) (cons name command))))) (setq menu-items (cdr menu-items))) menu)) -- 2.39.5