From: Leo Liu Date: Mon, 19 May 2014 16:08:40 +0000 (+0800) Subject: * emacs-lisp/cl-lib.el (cl-endp): Conform to CL's semantics. X-Git-Tag: emacs-25.0.90~2640^2~81 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=427de5355f3c70e60ddc65324f1270d533fca0c2;p=emacs.git * emacs-lisp/cl-lib.el (cl-endp): Conform to CL's semantics. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index abe240a5ea4..733d060f453 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-05-19 Leo Liu + + * emacs-lisp/cl-lib.el (cl-endp): Conform to CL's semantics. + 2014-05-18 Glenn Morris * loadup.el: diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 929e3dfb2f5..9ca9459987f 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -358,7 +358,13 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp (cl--defalias 'cl-first 'car) (cl--defalias 'cl-second 'cadr) (cl--defalias 'cl-rest 'cdr) -(cl--defalias 'cl-endp 'null) + +(defun cl-endp (x) + "Return true if X is the empty list; false if it is a cons. +Signal an error if X is not a list." + (if (listp x) + (null x) + (signal 'wrong-type-argument (list 'list x 'x)))) (cl--defalias 'cl-third 'cl-caddr "Return the third element of the list X.") (cl--defalias 'cl-fourth 'cl-cadddr "Return the fourth element of the list X.")