summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2002-05-14 21:20:24 +0000
committerJason Rumney <jasonr@gnu.org>2002-05-14 21:20:24 +0000
commitdd9b56636e148d19a34a0fee5b8155227b0146ad (patch)
tree7ac839713f85e116aceffb020866e17d7a583d82 /lisp/emacs-lisp
parentaf1a0140164f96d687b048a9074c5aa73372eafe (diff)
downloademacs-dd9b56636e148d19a34a0fee5b8155227b0146ad.tar.gz
emacs-dd9b56636e148d19a34a0fee5b8155227b0146ad.tar.bz2
emacs-dd9b56636e148d19a34a0fee5b8155227b0146ad.zip
(easy-menu-name-match): Match both
displayed text and internal name as string.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easymenu.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 51b2c3b91e4..fe0a8b841a5 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -413,7 +413,11 @@ NAME can be either a string, or a symbol."
(if (symbolp name)
(eq (car-safe item) name)
(if (stringp name)
- (member-ignore-case name item)))))
+ ;; Match against the text that is displayed to the user.
+ (or (member-ignore-case name item)
+ ;; Also check the string version of the symbol name,
+ ;; for backwards compatibility.
+ (eq (car-safe item) (intern name)))))))
(defun easy-menu-always-true (x)
"Return true if form X never evaluates to nil."