Commit e6f8ddbb authored by Stefan Monnier's avatar Stefan Monnier

* lisp/emacs-lisp/cl-lib.el (cl-endp): Move to cl-seq.el

Use 'cl-check-type'.
parent eccfdaff
Pipeline #807 passed with stage
in 50 minutes and 58 seconds
......@@ -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.")
......
......@@ -112,6 +112,13 @@
(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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment