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: Stefan Monnier
Subject: Re: predicate group-p to see if a group exists?
Date: Fri, 01 Feb 2008 09:53:49 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> 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'.

IIRC I've looked into it at some point.  The problem is that currently,
the data necessary to write custom-group-p is absent.

`customize-read-group' uses the following predicate for completion
purposes:

                     (lambda (symbol)
                       (or (and (get symbol 'custom-loads)
                                (not (get symbol 'custom-autoload)))
                           (get symbol 'custom-group)))

So we could use the above as the definition of custom-group-p, but IIRC
it's not 100% reliable/correct, and the lack of comments explaining why
we check (and (get symbol 'custom-loads) (not (get symbol 'custom-autoload)))
is also a significant problem.


        Stefan




reply via email to

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