From: Daniel Colascione <dancol@dancol.org>
To: Roland Winkler <winkler@gnu.org>, emacs-devel@gnu.org
Subject: Re: type checking for arbitrary lisp objects
Date: Fri, 11 Apr 2014 12:12:14 -0700 [thread overview]
Message-ID: <53483E8E.50406@dancol.org> (raw)
In-Reply-To: <15888.20727.131941.21320@gargle.gargle.HOWL>
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
On 04/11/2014 12:10 PM, Roland Winkler wrote:
> The function bbdb-check-type performs a type checking for atomic or
> compound lisp objects by comparing these objects against patterns
> that use a syntax kind of similar to the :type keyword used by
> defcustom (but without the extra keywords such as :tag used by
> defcustom). So a typical pattern is something like the following
>
> (vector (or string (const nil))
> (repeat string)
> (repeat (vector string (repeat string)
> string string))
> (repeat (cons symbol string))
> sexp)
>
> I am just wondering: Am I here reinventing the wheel because
> something similar has been developed already in some other package?
> If not, could this possibly also be useful for other packages (for
> example, for defining predicates used by the safe-local-variable
> property)?
Why not use cl-deftype?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2014-04-11 19:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 19:10 type checking for arbitrary lisp objects Roland Winkler
2014-04-11 19:12 ` Daniel Colascione [this message]
2014-04-11 19:22 ` Roland Winkler
2014-04-11 20:03 ` Stefan Monnier
2014-04-12 3:32 ` Roland Winkler
2014-04-12 13:16 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53483E8E.50406@dancol.org \
--to=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
--cc=winkler@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.