GNU bug report logs - #10251
24.0.92; easymenu: Document how to conditionalize display of separators.

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Thu, 8 Dec 2011 19:21:02 UTC

Severity: minor

Found in version 24.0.92

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: 10251 <at> debbugs.gnu.org
Subject: bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators.
Date: Thu, 8 Dec 2011 11:19:37 -0800
Consider a use case such as this.  You have a mouse menu with several
groups of items, separated by separator lines (e.g. "--").  One or more
of these groups should only be shown under certain conditions
(e.g. (featurep 'foo)).  You thus want to give a :visible condition to
not only the menu items in such a group but also to the separator that
precedes (or follows) the group.
 
In easymenu, the only documented case for a separator is a string of
separator chars, e.g. "--", not a vector entry that contains keywords
such as :visible.
 
You can use ["--" 'ignore :visible (my-condition)] to do the job.  But
this possibility is likely not to be obvious to everyone.  So please
document it.  (BTW, is there some other way to accomplish this?)
 
See also http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6344#21, which was
a similar bug (fixed).

In GNU Emacs 24.0.92.1 (i386-mingw-nt5.1.2600) of 2011-12-06 on MARVIN
 Windowing system distributor `Microsoft Corp.', version 5.1.2600
 configured using `configure --with-gcc (4.6) --no-opt --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-2.10.1/include --ldflags
 -LD:/devel/emacs/libs/gnutls-2.10.1/lib'
 





This bug report was last modified 11 years and 103 days ago.

Previous Next


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