From: Kevin Ryde <user42_kevin@yahoo.com.au>
To: 18442@debbugs.gnu.org
Subject: bug#18442: 24.3; easy-menu-define docstring of menu :label and :help
Date: Wed, 10 Sep 2014 16:57:12 +1000 [thread overview]
Message-ID: <87oauoklo7.fsf@blah.blah> (raw)
[-- Attachment #1: Type: text/plain, Size: 596 bytes --]
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@yahoo.com.au>
* emacs-lisp/easymenu.el (easy-menu-define): Docstring :label and
:help of the menu itself.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: easymenu.el.docstring.diff --]
[-- Type: text/x-diff, Size: 720 bytes --]
--- 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:
[-- Attachment #3: Type: text/plain, Size: 963 bytes --]
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''
next reply other threads:[~2014-09-10 6:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 6:57 Kevin Ryde [this message]
2019-08-03 18:32 ` bug#18442: 24.3; easy-menu-define docstring of menu :label and :help Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oauoklo7.fsf@blah.blah \
--to=user42_kevin@yahoo.com.au \
--cc=18442@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.