bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10251: 24.0.92; easymenu: Document how to conditionalize display of


From: Drew Adams
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'
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]