From: Jason Rumney Date: Tue, 14 May 2002 21:20:24 +0000 (+0000) Subject: (easy-menu-name-match): Match both X-Git-Tag: ttn-vms-21-2-B4~15054 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dd9b56636e148d19a34a0fee5b8155227b0146ad;p=emacs.git (easy-menu-name-match): Match both displayed text and internal name as string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 055c649df64..1b03522e9df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-05-14 Jason Rumney + + * emacs-lisp/easymenu.el (easy-menu-name-match): Match both + displayed text and internal name as string. + 2002-05-14 Kim F. Storm * emulation/cua-rect.el (cua--rectangle-operation): 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."