summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lmenu.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/lmenu.el')
-rw-r--r--lisp/emacs-lisp/lmenu.el8
1 files 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))