[Top][All Lists]

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

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

From: Lennart Borgman (gmail)
Subject: Re: predicate group-p to see if a group exists?
Date: Fri, 01 Feb 2008 16:00:26 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Stefan Monnier wrote:
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

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

But why not use this? It will at least be consisten?

reply via email to

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