[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: Lute Kamstra
Subject: Re: Default :group in lisp/emacs-lisp/easy-mmode.el.
Date: Sat, 02 Apr 2005 11:41:14 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Luc Teirlinck <address@hidden> writes:

> Richard Stallman wrote:
>    The use of custom-current-group seems like a bad practice to me.
>    It is unreliable to make one defun depend on whatever was lying around
>    from a previous defun in this way.  It has the result that moving
>    code from one place in a file to another changes its meaning.
>    So I think it would be better to document that define-minor-mode
>    and easy-mmode-define-global-mode default the group based
>    solely on the mode name.
> I believe the default :group need not be documemted, because it should
> *never* be relied on.  I believe that what should be emphatically
> documented in the docstring of define-minor-mode and all other places
> where define-minor-mode is documented is that an explicit :group
> should *always* be given.  

> Alternatively, if the default group would be documented, then it
> should be emphatically pointed out that, if the user relies on that
> default, then the user needs to manually write an appropriate
> defgroup for that default group, _with a valid parent group_, having
> one of the major groups as an ancestor.  (Unless such a defgroup
> already exists.)

All these things apply just as well to a :group value you specify
explicitly.  I think it's enough (and a good thing) that the user of
define-minor-mode knows that :group defaults and to what.


reply via email to

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