[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: type checking for arbitrary lisp objects
From: |
Daniel Colascione |
Subject: |
Re: type checking for arbitrary lisp objects |
Date: |
Fri, 11 Apr 2014 12:12:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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?
signature.asc
Description: OpenPGP digital signature