]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/cl-lib.el (cl-endp): Move to cl-seq.el
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 18 Feb 2019 18:16:57 +0000 (13:16 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 18 Feb 2019 18:16:57 +0000 (13:16 -0500)
Use 'cl-check-type'.

lisp/emacs-lisp/cl-lib.el
lisp/emacs-lisp/cl-seq.el

index 60c52c26ca39897ca0fa8a30cbde094d7ea7f296..3a9280fae629c4c646733227c220b556b43ce081 100644 (file)
@@ -365,13 +365,6 @@ SEQ, this is like `mapcar'.  With several, it is like the Common Lisp
 (cl--defalias 'cl-second 'cadr)
 (cl--defalias 'cl-rest 'cdr)
 
-(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 'listp 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.")
 
index 31ad81118580b9117f6d50bcaa652da4f919ea79..3eb6ea16daf6bf36c97a0d30e68370bde554781c 100644 (file)
 (defvar cl-if) (defvar cl-if-not)
 (defvar cl-key)
 
+;;;###autoload
+(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."
+  (cl-check-type x list)
+  (null x))
+
 ;;;###autoload
 (defun cl-reduce (cl-func cl-seq &rest cl-keys)
   "Reduce two-argument FUNCTION across SEQ.