Subject: bug#18442: 24.3; easy-menu-define docstring of menu :label and :help

From: Kevin Ryde <[email-masked]>
Date: Wed, 10 Sep 2014 16:57:12 +1000

I see easy-menu-define accepts :label for the menu name, ie. the button
which opens the menu or sub-menu.  Eg. a top-level item changing on
every redisplay,

    (easy-menu-define my-menu global-map "my menu docstring"
      '("MyTest"
        :label (format "MyTest-%d" (random 100))
        ["Foo" doctor t]))

Is this a documented feature?  It'd be good to describe it in the
docstring.  Perhaps something like below, with :help similarly too.

2014-09-09  Kevin Ryde  <[email-masked]>

	* emacs-lisp/easymenu.el (easy-menu-define): Docstring :label and
	:help of the menu itself.

--- easymenu.el.orig	2014-09-10 16:40:15.959124358 +1000
+++ easymenu.el	2014-09-10 16:42:55.067126503 +1000
@@ -71,6 +71,17 @@
     if the expression evaluates to a non-nil value.  `:enable' is
     an alias for `:active'.
 
+ :label FORM
+    FORM is an expression that is dynamically evaluated and whose
+    value serves as the menu's label (the default is the first
+    element of MENU).
+
+ :help HELP
+    HELP is a string, the help to display for the menu.
+    In a GUI this is a \"tooltip\" on the menu button.  (Though
+    in Lucid :help is not shown for the top-level menu bar, only
+    for sub-menus.)
+
 The rest of the elements in MENU are menu items.
 A menu item can be a vector of three elements:

In GNU Emacs 24.3.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2014-06-07 on babin, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
Configured using:
 `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' '--without-gconf'
 '--without-gsettings' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2
 -fstack-protector --param=ssp-buffer-size=4 -Wformat
 -Werror=format-security -Wall' 'LDFLAGS=-Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''