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

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

bug#7754: 24.0.50; easy-menu: fix misnamed keywords


From: Drew Adams
Subject: bug#7754: 24.0.50; easy-menu: fix misnamed keywords
Date: Wed, 29 Dec 2010 07:26:08 -0800

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'
 






reply via email to

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