From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: predicate group-p to see if a group exists? Date: Fri, 01 Feb 2008 16:00:26 +0100 Message-ID: <47A3340A.1040707@gmail.com> References: <002801c8645d$6fb86230$9eb22382@us.oracle.com> <47A2BEEA.2010702@gmx.at> <002401c864a1$9bce4d00$864a908d@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201878082 19808 80.91.229.12 (1 Feb 2008 15:01:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Feb 2008 15:01:22 +0000 (UTC) Cc: 'martin rudalics' , Drew Adams , 'Emacs-Devel' To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 01 16:01:39 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JKxOI-0006P4-MJ for ged-emacs-devel@m.gmane.org; Fri, 01 Feb 2008 16:01:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKxNr-0000sG-6v for ged-emacs-devel@m.gmane.org; Fri, 01 Feb 2008 10:00:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKxNn-0000rv-3Y for emacs-devel@gnu.org; Fri, 01 Feb 2008 10:00:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKxNl-0000rF-KF for emacs-devel@gnu.org; Fri, 01 Feb 2008 10:00:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKxNl-0000rC-IQ for emacs-devel@gnu.org; Fri, 01 Feb 2008 10:00:45 -0500 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JKxNl-0006jq-59 for emacs-devel@gnu.org; Fri, 01 Feb 2008 10:00:45 -0500 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:60425 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JKxNg-00028m-8J; Fri, 01 Feb 2008 16:00:40 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: X-Antivirus: avast! (VPS 080201-0, 2008-02-01), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1JKxNg-00028m-8J. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1JKxNg-00028m-8J 51abda20bf177132a7ccb235ac3819e7 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87934 Archived-At: 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 > 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. But why not use this? It will at least be consisten?