emacs-devel
[Top][All Lists]
Advanced

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

Re: doc elisp intro cross reference fixes


From: Luc Teirlinck
Subject: Re: doc elisp intro cross reference fixes
Date: Sun, 30 Nov 2003 15:07:02 -0600 (CST)

Stefan Monnier wrote:

   It was made not for the case where the author forgot the :group (which is
   a rare and unimportant occurence AFAIK), but for the case where the author
   is tired of putting the redundant :group argument for his package
   foo-mode.el which begins by declaring a group `foo' and then goes on to
   declare a couple defcustoms which obviously can only belong in the `foo'
   group unless stated otherwise.

I did misunderstand the intent.  Nevertheless, there are problems.
First of all, there is the possibility of existing code being broken.
Secondly, before your change, adding a defgroup to a file was
harmless, but now one has to be extremely careful with that.  I
personally would be very reluctant to use your feature, just in case
somebody sooner or later added another defgroup.   Currently your
feature is not widely known and people do not know that adding
defgroups to files has become dangerous.

   As for the case where the author explicitly wanted the defcustom
   to not be in any group, I think this is unusual enough that it deserves
   a more explicit way to express it.  For example by specifying something
   like `:group 'nogroup' or `:group nil'.

If it is OK for an option not to have a group, then there should be
a way for the author to specify that.  For `:group nil' to be
equivalent with specifying no group, one should make sure that the
option was automatically removed from the `nil' group if it was added
to a "real" group elsewhere.

   2 - Maybe the code you want to remove should indeed by amended so it
       does not try to "guess" in the case where there have been several
       defgroups in the file already.

That would not work.  Somebody defines a second defgroup in an
existing file and all options get kicked into the nil group.

By the way the entry:

** defcustom and other custom declarations now use a default group
(the last group defined in the same file) when no :group was given.

Is ambiguous: Is really meant "the last group" or "the last prior
group".

Sincerely,

Luc.




reply via email to

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