changeset 45299:948bb97d1e60

(easy-menu-name-match): Match both displayed text and internal name as string.
author Jason Rumney <jasonr@gnu.org>
date Tue, 14 May 2002 21:19:16 +0000
parents 539cd2d3c083
children f3807a8b5946
files lisp/emacs-lisp/easymenu.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easymenu.el	Tue May 14 21:11:10 2002 +0000
+++ b/lisp/emacs-lisp/easymenu.el	Tue May 14 21:19:16 2002 +0000
@@ -413,7 +413,11 @@
       (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."