all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7754: 24.0.50; easy-menu: fix misnamed keywords
@ 2010-12-29 15:26 Drew Adams
  2010-12-29 17:02 ` Drew Adams
  2011-01-14  2:14 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Drew Adams @ 2010-12-29 15:26 UTC (permalink / raw)
  To: 7754

Easy-menu uses a non-standard :active keyword to mean what :enable means
in regular menus.  Similarly, it used to use :included to mean what
:visible means.  The latter inconsistency was fixed long ago, by
aliasing.  The former has never been fixed.
 
I see no conflict in the code - no reason not to just use :enable
(e.g. alias :active to :enable and ultimately deprecate :active).
 
From the `easy-menu-define' doc string (in two places, one for a "menu",
the other for an "item":
 
 :visible INCLUDE
 
 INCLUDE is an expression; this (menu|item) is only visible if this
 expression has a non-nil value.  `:included' is an alias for `:visible'.
 
 :active ENABLE
 
 ENABLE is an expression; the (menu|item) is enabled for selection
 whenever this expression's value is non-nil.
 
I see no reason to treat the misnamed :active any different from the
misnamed :included.
 
Note: I sent this request to emacs-devel on 2009-05-22, but got no
response.  Here is that mail:
 
> From: Drew Adams Sent: Friday, May 22, 2009 3:07 PM
> 
> Why does easymenu.el use :active instead of :enable? This 
> inconsistency just makes things more complex for users, without
> any gain (that I can see).
> 
> The code even translates :active to :enable! Why not just 
> accept :enable? And then perhaps we could sooner or later
> deprecate :active.
> 
> Shouldn't we just choose one or the other, :enable or 
> :active, and stick to it consistently?
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-12-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 






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

* bug#7754: 24.0.50; easy-menu: fix misnamed keywords
  2010-12-29 15:26 bug#7754: 24.0.50; easy-menu: fix misnamed keywords Drew Adams
@ 2010-12-29 17:02 ` Drew Adams
  2011-01-14  2:14 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2010-12-29 17:02 UTC (permalink / raw)
  To: 7754

Further browsing indicates that :active is a leftover from XEmacs.
E.g., this code in vhdl-mode.el:

["Rescan Directory" vhdl-speedbar-rescan-hierarchy
 :active (save-excursion (beginning-of-line) (looking-at "[0-9]+:"))
 ,(if (featurep 'xemacs) :active :visible) (not vhdl-speedbar-show-projects)]
      ^^^^^^^^^^^^^^^^^^^^^^^^^^






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

* bug#7754: 24.0.50; easy-menu: fix misnamed keywords
  2010-12-29 15:26 bug#7754: 24.0.50; easy-menu: fix misnamed keywords Drew Adams
  2010-12-29 17:02 ` Drew Adams
@ 2011-01-14  2:14 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2011-01-14  2:14 UTC (permalink / raw)
  To: Drew Adams; +Cc: 7754

close 7754
thanks

> Easy-menu uses a non-standard :active keyword to mean what :enable means
> in regular menus.  Similarly, it used to use :included to mean what
> :visible means.  The latter inconsistency was fixed long ago, by
> aliasing.  The former has never been fixed.
 
Fixed, thanks,


        Stefan





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

end of thread, other threads:[~2011-01-14  2:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-29 15:26 bug#7754: 24.0.50; easy-menu: fix misnamed keywords Drew Adams
2010-12-29 17:02 ` Drew Adams
2011-01-14  2:14 ` Stefan Monnier

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.