Function: easy-menu-name-match

easy-menu-name-match is a byte-compiled function defined in easymenu.el.gz.

Signature

(easy-menu-name-match NAME ITEM)

Documentation

Return t if NAME is the name of menu item ITEM.

NAME can be either a string, or a symbol. ITEM should be a keymap binding of the form (KEY . MENU-ITEM).

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/easymenu.el.gz
(defun easy-menu-name-match (name item)
  "Return t if NAME is the name of menu item ITEM.
NAME can be either a string, or a symbol.
ITEM should be a keymap binding of the form (KEY . MENU-ITEM)."
  (if (consp item)
      (if (symbolp name)
	  (eq (car-safe item) name)
	(if (stringp name)
	    ;; Match against the text that is displayed to the user.
	    (or (condition-case nil (member-ignore-case name item)
		  (error nil))		;`item' might not be a proper list.
		;; Also check the string version of the symbol name,
		;; for backwards compatibility.
		(eq (car-safe item) (intern name)))))))