unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'martin rudalics'" <rudalics@gmx.at>
Cc: 'Emacs-Devel' <emacs-devel@gnu.org>
Subject: RE: predicate group-p to see if a group exists?
Date: Thu, 31 Jan 2008 23:11:03 -0800	[thread overview]
Message-ID: <002401c864a1$9bce4d00$864a908d@us.oracle.com> (raw)
In-Reply-To: <47A2BEEA.2010702@gmx.at>

> > 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	other threads:[~2008-02-01  7:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 23:03 predicate group-p to see if a group exists? Drew Adams
2008-02-01  6:40 ` martin rudalics
2008-02-01  7:11   ` Drew Adams [this message]
2008-02-01 14:53     ` Stefan Monnier
2008-02-01 15:00       ` Lennart Borgman (gmail)
2008-02-02  7:39     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002401c864a1$9bce4d00$864a908d@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).