]> git.eshelyaron.com Git - emacs.git/commitdiff
(easy-menu-name-match): Match both
authorJason Rumney <jasonr@gnu.org>
Tue, 14 May 2002 21:20:24 +0000 (21:20 +0000)
committerJason Rumney <jasonr@gnu.org>
Tue, 14 May 2002 21:20:24 +0000 (21:20 +0000)
displayed text and internal name as string.

lisp/ChangeLog
lisp/emacs-lisp/easymenu.el

index 055c649df64d098a6c259b4d3f8403e04fee6be0..1b03522e9df52d0cf4f85ea0a7a976ec50b0acc8 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-14  Jason Rumney  <jasonr@gnu.org>
+
+       * emacs-lisp/easymenu.el (easy-menu-name-match): Match both
+       displayed text and internal name as string.
+
 2002-05-14  Kim F. Storm  <storm@cua.dk>
 
        * emulation/cua-rect.el (cua--rectangle-operation): 
index 51b2c3b91e472c71997afee88e6d965b66ab112a..fe0a8b841a58b5c2321ae2c6a51e42809a78b14f 100644 (file)
@@ -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."