comparison lisp/cl-macs.el @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children 1ccc32a20af4
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
2432 (list 'and (list 'member* val (list 'quote (cdr type))) t)) 2432 (list 'and (list 'member* val (list 'quote (cdr type))) t))
2433 ((eq (car-safe type) 'satisfies) (list (cadr type) val)) 2433 ((eq (car-safe type) 'satisfies) (list (cadr type) val))
2434 (t (error "Bad type spec: %s" type))))) 2434 (t (error "Bad type spec: %s" type)))))
2435 2435
2436 ;;;###autoload 2436 ;;;###autoload
2437 (defun typep (val type) ; See compiler macro below. 2437 (defun typep (object type) ; See compiler macro below.
2438 "Check that OBJECT is of type TYPE. 2438 "Check that OBJECT is of type TYPE.
2439 TYPE is a Common Lisp-style type specifier." 2439 TYPE is a Common Lisp-style type specifier."
2440 (eval (cl-make-type-test 'val type))) 2440 (eval (cl-make-type-test 'object type)))
2441 2441
2442 ;;;###autoload 2442 ;;;###autoload
2443 (defmacro check-type (form type &optional string) 2443 (defmacro check-type (form type &optional string)
2444 "Verify that FORM is of type TYPE; signal an error if not. 2444 "Verify that FORM is of type TYPE; signal an error if not.
2445 STRING is an optional description of the desired type." 2445 STRING is an optional description of the desired type."