unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators.
@ 2011-12-08 19:19 Drew Adams
  2012-09-17  0:21 ` Drew Adams
  2014-02-09  5:42 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2011-12-08 19:19 UTC (permalink / raw)
  To: 10251

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'
 






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

* bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators.
  2011-12-08 19:19 bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators Drew Adams
@ 2012-09-17  0:21 ` Drew Adams
  2014-02-09  5:42 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2012-09-17  0:21 UTC (permalink / raw)
  To: 10251

ping






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

* bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators.
  2011-12-08 19:19 bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators Drew Adams
  2012-09-17  0:21 ` Drew Adams
@ 2014-02-09  5:42 ` Lars Ingebrigtsen
  2014-02-11 15:05   ` Drew Adams
  1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-09  5:42 UTC (permalink / raw)
  To: Drew Adams; +Cc: 10251

"Drew Adams" <drew.adams@oracle.com> writes:

> 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?)

This seems to be covered in the "Menu Separators" node.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

* bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators.
  2014-02-09  5:42 ` Lars Ingebrigtsen
@ 2014-02-11 15:05   ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2014-02-11 15:05 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 10251

> > 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?)
> 
> This seems to be covered in the "Menu Separators" node.

No, it is not.  This is about easy-menu, which is a different beast.

It is not at all obvious that you can do this with easy-menu.





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

end of thread, other threads:[~2014-02-11 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 19:19 bug#10251: 24.0.92; easymenu: Document how to conditionalize display of separators Drew Adams
2012-09-17  0:21 ` Drew Adams
2014-02-09  5:42 ` Lars Ingebrigtsen
2014-02-11 15:05   ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).