GNU bug report logs - #18442
24.3; easy-menu-define docstring of menu :label and :help

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Kevin Ryde <user42_kevin@HIDDEN>; dated Wed, 10 Sep 2014 07:02:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Sep 2014 07:01:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 10 03:01:10 2014
Received: from localhost ([127.0.0.1]:35907 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XRbtt-0006yW-Pr
	for submit <at> debbugs.gnu.org; Wed, 10 Sep 2014 03:01:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43024)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <user42_kevin@HIDDEN>) id 1XRbtr-0006yJ-RB
 for submit <at> debbugs.gnu.org; Wed, 10 Sep 2014 03:01:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <user42_kevin@HIDDEN>) id 1XRbtf-0004oG-LH
 for submit <at> debbugs.gnu.org; Wed, 10 Sep 2014 03:01:02 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:56953)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <user42_kevin@HIDDEN>) id 1XRbtf-0004o9-HD
 for submit <at> debbugs.gnu.org; Wed, 10 Sep 2014 03:00:55 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44698)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <user42_kevin@HIDDEN>) id 1XRbtZ-0002PJ-EL
 for bug-gnu-emacs@HIDDEN; Wed, 10 Sep 2014 03:00:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <user42_kevin@HIDDEN>) id 1XRbtT-0004m6-FZ
 for bug-gnu-emacs@HIDDEN; Wed, 10 Sep 2014 03:00:49 -0400
Received: from nm11-vm1.bullet.mail.bf1.yahoo.com ([98.139.213.152]:53797)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <user42_kevin@HIDDEN>) id 1XRbtT-0004lu-AX
 for bug-gnu-emacs@HIDDEN; Wed, 10 Sep 2014 03:00:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048;
 t=1410332442; bh=lumRYAnKFlwzs6JCzQS6Ro6OXYcnho5k+eB2rdboJ6o=;
 h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:From:Subject;
 b=Q4NfKiQLXN9Q3g1SlJ7eyL71KZYPoLclFwcQl5jxJhJBtQ+kT2yg0WGeSRtS5XDowlKyEkTj6LNZeQkc+b+IzmRtK5S3jAbKE2oh0JnFvtSuZCoOXVJHM8Px0fNS2KDRM5uoTZwJ6nkxrSJ4sAUDqmcv47QUsyMY+GLFJog4JOZWuT8/R6BgKGt27oKSfhilZO0M5OJ8nlie0FEafPqu5RG7nIk/72262vXmN+Rx/O1jGOhP/EdJUqCtgJ+0+5clgXkB/ju8RS3pPoveGcsTdb/+c9HTEFfw52ylacSgv31nl/+805LfiBRE8BiKGfTajj6hnEeyou6VGMCNAbP/BQ==
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com.au;
 b=COfLLpwriL35bX7CMaGr/cP2kaswWF56DOQT4FaimpDBZ72GXbGRwNxKwPCZE4Kv5DRzOHMTfAgcQyunMnCmkoNxMfntHXlbR494UWcNipVfz3I7iwNy5cWoAhP8wfMpt+z9v2+Jlo7WFjGCXtsEgCgMi05hDUM4S8LTIRCcrBwsjk2gcXD0AzOEcfxrCbPbThfrVYJMh+evzG0g8Do8zmovKaWHP93abuMUKCSvNmiNC6CKYa4aBqvaDfrE8sHwL81Og7UftKog6WHgjEvpQb7UBUKKGyi4aqNbRx2vs2LhPxJPPFF84R/mQYEpdhs4odFJFPwddEXS5OWURZmd6g==;
Received: from [98.139.212.153] by nm11.bullet.mail.bf1.yahoo.com with NNFMP;
 10 Sep 2014 07:00:42 -0000
Received: from [68.142.230.72] by tm10.bullet.mail.bf1.yahoo.com with NNFMP;
 10 Sep 2014 07:00:42 -0000
Received: from [127.0.0.1] by smtp229.mail.bf1.yahoo.com with NNFMP;
 10 Sep 2014 07:00:42 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s1024;
 t=1410332442; bh=lumRYAnKFlwzs6JCzQS6Ro6OXYcnho5k+eB2rdboJ6o=;
 h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type;
 b=uESdwX8knS4qe19RyeIfngYv4Yoz6pME5e2guMFgYZfXEwinbicy4NjO5jrD09YfRj1IAJ79uhf1qMdsCEH1uRn19kmraSJndV2S7zSvTyWrOL62RaZ720MYRYnoIwP1YrE1Ou7NL/TXIk7mEg0cGEBy8+nKuyQE1iE8DoFzDSA=
X-Yahoo-Newman-Id: 485802.75126.bm@HIDDEN
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: K5qIaLQVM1nkb0hInfOYIOZ2Kt0ro4qvB0wgbmqbW.XvZu7
 VcrFSkWY7pYC0zWMGdyw_FsxeIG3AAWLt6ASUl6.YBSWcHu9hQ7SO3EL4FYb
 kiFJmbaWx2NQFtgfEEjIzJoOVHR.PtXMaI2nTWvSQMr_igNMlRDq.Hz8KYKN
 QjCLAy9ExNBuBcb3gZAZIzaSNPQ9UapbeJnpoiW_6Dc48ssKFlz_DsszJxz0
 UPxoLblIaXAStC3hgeDZ1Tyn_W5rwKu3cAONHNDP79nkCrXLZEfUsnNkEdqh
 YSFUAWBe5AK9foR4WnGQwHceRV.8G1jhWGAx4w842EQL_7y4gT9Ui8QEgEKi
 ugQyP_4Sduj6uR.OCpr_TQ_mi.hfvsb7mtgLEvBdvielhTHQZHRk.GathUAJ
 IpwJMWZO1zdhtGjNf82JAqjbPelDbRvoTBvtyfn_SxQCXNZHr_PRAVGbmDpW
 E1g7TbG9sy5Inh3.PHZvXaTDjYk5Y0T4oBSbHWy.zxML577ywvTKahK48IBw
 X2uRxg61vyGymYDqsIdRQbeMN4tpS9jW7MiTIo4xBgSwpkMTduazuYjLIIlO
 K4bTwifrweaQ-
X-Yahoo-SMTP: U8NKAo6swBAxDIMUovTitGGHebxdYQBZ5A--
From: Kevin Ryde <user42_kevin@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3; easy-menu-define docstring of menu :label and :help
Date: Wed, 10 Sep 2014 16:57:12 +1000
Message-ID: <87oauoklo7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--=-=-=
Content-Type: text/plain

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@HIDDEN>

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


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=easymenu.el.docstring.diff

--- 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:
 

--=-=-=
Content-Type: text/plain



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

--=-=-=--




Acknowledgement sent to Kevin Ryde <user42_kevin@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#18442; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.