Function: easy-menu-make-symbol

easy-menu-make-symbol is a byte-compiled function defined in easymenu.el.gz.

Signature

(easy-menu-make-symbol CALLBACK &optional NOEXP)

Documentation

Return a unique symbol with CALLBACK as function value.

When non-nil, NOEXP indicates that CALLBACK cannot be an expression
(i.e. does not need to be turned into a function).

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/easymenu.el.gz
(defun easy-menu-make-symbol (callback &optional noexp)
  "Return a unique symbol with CALLBACK as function value.
When non-nil, NOEXP indicates that CALLBACK cannot be an expression
\(i.e. does not need to be turned into a function)."
  (let ((command
	 (make-symbol (format "menu-function-%d" easy-menu-item-count))))
    (setq easy-menu-item-count (1+ easy-menu-item-count))
    (fset command
	  (if (or (keymapp callback) (commandp callback)
                  ;; `functionp' is probably not needed.
                  (functionp callback) noexp)
              callback
	    (eval `(lambda () (interactive) ,callback) t)))
    command))