[Top][All Lists]

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

Re: Default :group in lisp/emacs-lisp/easy-mmode.el.

From: Luc Teirlinck
Subject: Re: Default :group in lisp/emacs-lisp/easy-mmode.el.
Date: Sat, 2 Apr 2005 11:46:48 -0600 (CST)

Stefan Monnier wrote:

   The whole point of the use of custom-current-group is to try and default to
   the group that was defined in the current file.  Such a group is unlikely to
   be "bogus".  I still think it's a much better default and it shouldn't
   be removed.

I did not actually check this, but I believe, from reading he code,
that Lute's patch will introduce at least one new bug (which would be
trivial to fix, however).  `display-battery-mode', a useful option
that people may actually want to set, as well as
`display-battery-mode-hook', would be moved from the current `battery'
group, where they belong, to the bogus `display-battery' group, where
nobody will ever find them.  There probably are other cases like this,
although I do not know any other concrete additional examples.

That being said, even without Lute's patch, I propose to add an
explicit ":group 'battery" to the display-battery-mode
define-minor-mode.  It seems to be a lot more solid.

I personally do not like the `custom-current-group' feature, neither
in defcustom (where it is currently used, as Lute pointed out), nor in
define-minor-mode, nor in define-generic-mode, for reasons similar to
the ones Richard gave, as well as for some additional reasons.  _But_
a default group depending on the option name is even worse.

What I actually would have liked is to put all defcustoms without an
explicitly provided group into a default 'junk group (similar to the
old `nil' group, just with a different name).  This would be the
default group for define-{minor,generic}-mode too.  Then we could
periodically check that group and assign proper groups, if anything
strayed in there.  By the way, what happened to the nil group?  Has it
been removed?

But, I guess that at the present state it will be difficult to do that
and get rid of `custom-current-group', because many things already
rely on `custom-current-group'.  What we definitely could and, I
believe should, do is discourage people from relying on it, because it
is quite simply not solid.



reply via email to

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