GNU bug report logs -
#18442
24.3; easy-menu-define docstring of menu :label and :help
Previous Next
Reported by: Kevin Ryde <user42_kevin <at> yahoo.com.au>
Date: Wed, 10 Sep 2014 07:02:01 UTC
Severity: minor
Tags: fixed
Found in version 24.3
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18442 in the body.
You can then email your comments to 18442 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18442
; Package
emacs
.
(Wed, 10 Sep 2014 07:02:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kevin Ryde <user42_kevin <at> yahoo.com.au>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 10 Sep 2014 07:02:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <user42_kevin <at> yahoo.com.au>
* emacs-lisp/easymenu.el (easy-menu-define): Docstring :label and
:help of the menu itself.
[easymenu.el.docstring.diff (text/x-diff, inline)]
--- 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:
[Message part 3 (text/plain, inline)]
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''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18442
; Package
emacs
.
(Sat, 03 Aug 2019 18:33:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18442 <at> debbugs.gnu.org (full text, mbox):
Kevin Ryde <user42_kevin <at> yahoo.com.au> writes:
> 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 <user42_kevin <at> yahoo.com.au>
>
> * emacs-lisp/easymenu.el (easy-menu-define): Docstring :label and
> :help of the menu itself.
Thanks; applied to Emacs 27.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 03 Aug 2019 18:34:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
18442 <at> debbugs.gnu.org and Kevin Ryde <user42_kevin <at> yahoo.com.au>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 03 Aug 2019 18:34:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Sep 2019 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.