]> git.eshelyaron.com Git - emacs.git/commitdiff
; Improve documentation of 'easy-menu-define'
authorEli Zaretskii <eliz@gnu.org>
Sat, 14 Sep 2024 08:55:08 +0000 (11:55 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 14 Sep 2024 20:34:06 +0000 (22:34 +0200)
* 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)

(cherry picked from commit ad289f364e5c508d6f5d6ae530ee919c5fa43335)

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

index c06de3a6852a2455dded38854c60dc59296cbc85..2f9529a2a1891b70ab931ad92b2652e8ae0a6388 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,