emacs-devel
[Top][All Lists]
Advanced

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

RE: predicate group-p to see if a group exists?


From: Drew Adams
Subject: RE: predicate group-p to see if a group exists?
Date: Thu, 31 Jan 2008 23:11:03 -0800

> > There seems to be no predicate to test whether a particular group is
> > defined. Should there be one? (group-p 'foo)
> 
> You could write
> 
> (defgroup my-foo nil "jjjj"
>    :group (if (get 'foo 'custom-group) 'foo 'bar))
> 
> because it's unlikely that a custom group doesn't have any members
> (except for the case when you're just specifying it - like my-foo).

Yes, but that wouldn't occur to most people. Using `defgroup', `defcustom',
and `defface' shouldn't require knowledge of how Customize is implemented. 

Granted, most users of `defgroup', `defcustom', and `defface' will not need
to test whether a given group exists, but some will. I still have the
question whether we shouldn't have a function `group-p'.





reply via email to

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