summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easymenu.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-02-26 19:54:59 +0100
committerAndrea Corallo <akrl@sdf.org>2021-02-26 19:54:59 +0100
commit5c922cc3a4b0677805a678267df2b7598e92bb83 (patch)
treef7680e085436621332230c7a46df36ad4048310b /lisp/emacs-lisp/easymenu.el
parentcedc55041ea5179dcb389845d2d0e3562060cab9 (diff)
parent496fa1c03b1b3ce4aa9872751e9fac45167766c2 (diff)
downloademacs-5c922cc3a4b0677805a678267df2b7598e92bb83.tar.gz
emacs-5c922cc3a4b0677805a678267df2b7598e92bb83.tar.bz2
emacs-5c922cc3a4b0677805a678267df2b7598e92bb83.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/emacs-lisp/easymenu.el')
-rw-r--r--lisp/emacs-lisp/easymenu.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 39b3193b2f4..8ddfb9e78ef 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -23,6 +23,9 @@
;;; Commentary:
+;; The `easy-menu-define' macro provides a convenient way to define
+;; pop-up menus and/or menu bar menus.
+;;
;; This is compatible with easymenu.el by Per Abrahamsen
;; but it is much simpler as it doesn't try to support other Emacs versions.
;; The code was mostly derived from lmenu.el.
@@ -140,7 +143,7 @@ solely of dashes is displayed as a menu separator.
Alternatively, a menu item can be a list with the same format as
MENU. This is a submenu."
- (declare (indent defun) (debug (symbolp body)))
+ (declare (indent defun) (debug (symbolp body)) (doc-string 3))
`(progn
,(if symbol `(defvar ,symbol nil ,doc))
(easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu)))
@@ -181,12 +184,12 @@ This is expected to be bound to a mouse event."
(funcall
(or (plist-get (get symbol 'menu-prop)
:filter)
- 'identity)
+ #'identity)
(symbol-function symbol)))
symbol))))
;; These symbols are commands, but not interesting for users
;; to `M-x TAB'.
- (put symbol 'completion-predicate 'ignore))
+ (function-put symbol 'completion-predicate #'ignore))
(dolist (map (if (keymapp maps) (list maps) maps))
(define-key map
(vector 'menu-bar (easy-menu-intern (car menu)))