; Improve documentation of 'easy-menu-define'
authorEli Zaretskii <eliz@gnu.org>
Sat, 14 Sep 2024 08:55:08 +0000 (11:55 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 14 Sep 2024 08:55:08 +0000 (11:55 +0300)
* doc/lispref/keymaps.texi (Easy Menu):
* lisp/emacs-lisp/easymenu.el (easy-menu-define): Document that
SYMBOL is also defined as a variable.  (Bug#73108)

doc/lispref/keymaps.texi
lisp/emacs-lisp/easymenu.el

index a67d8da244e9873d1fb7ae6b3872026a3a4fcdc6..a207b0cbb9d4deff8f6f9f32546d4d0c2f585210 100644 (file)
@@ -3243,7 +3243,8 @@ contents are given by @var{menu}.
 
 If @var{symbol} is non-@code{nil}, it should be a symbol; then this
 macro defines @var{symbol} as a function for popping up the menu
-(@pxref{Pop-Up Menus}), with @var{doc} as its documentation string.
+(@pxref{Pop-Up Menus}), with @var{doc} as its documentation string.  It
+also defines @var{symbol} as a variable whose value is the menu.
 @var{symbol} should not be quoted.
 
 Regardless of the value of @var{symbol}, if @var{maps} is a keymap,
index 6740c2af58d18f92396128a3c5ed60a73ecd69e1..0a273ef0f7caa940ccc2525306a9ca83ad344efd 100644 (file)
@@ -38,7 +38,8 @@
 (defmacro easy-menu-define (symbol maps doc menu)
   "Define a pop-up menu and/or menu bar menu specified by MENU.
 If SYMBOL is non-nil, define SYMBOL as a function to pop up the
-submenu defined by MENU, with DOC as its doc string.
+submenu defined by MENU, with DOC as its doc string.  Also define
+SYMBOL as a variable whose value is the menu.
 
 MAPS, if non-nil, should be a keymap or a list of keymaps; add
 the submenu defined by MENU to the keymap or each of the keymaps,