all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18442: 24.3; easy-menu-define docstring of menu :label and :help
@ 2014-09-10  6:57 Kevin Ryde
  2019-08-03 18:32 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2014-09-10  6:57 UTC (permalink / raw)
  To: 18442

[-- 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''

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#18442: 24.3; easy-menu-define docstring of menu :label and :help
  2014-09-10  6:57 bug#18442: 24.3; easy-menu-define docstring of menu :label and :help Kevin Ryde
@ 2019-08-03 18:32 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-03 18:32 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 18442

Kevin Ryde <user42_kevin@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@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-03 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10  6:57 bug#18442: 24.3; easy-menu-define docstring of menu :label and :help Kevin Ryde
2019-08-03 18:32 ` Lars Ingebrigtsen

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.