(easy-menu-name-match): Match both

displayed text and internal name as string.
This commit is contained in:
Jason Rumney 2002-05-14 21:20:24 +00:00
parent af1a014016
commit dd9b56636e
2 changed files with 10 additions and 1 deletions

View 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."