aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2019-02-18 13:16:57 -0500
committerStefan Monnier2019-02-18 13:16:57 -0500
commite6f8ddbb3b8f99c73b2be66bb1e691d4757c3b12 (patch)
treef7eed4001cb7ccb23d9673601c4cb155727d0dd3
parenteccfdaff5b52e1fadbaf2fbbb6c1366a7addf377 (diff)
downloademacs-e6f8ddbb3b8f99c73b2be66bb1e691d4757c3b12.tar.gz
emacs-e6f8ddbb3b8f99c73b2be66bb1e691d4757c3b12.zip
* lisp/emacs-lisp/cl-lib.el (cl-endp): Move to cl-seq.el
Use 'cl-check-type'.
-rw-r--r--lisp/emacs-lisp/cl-lib.el7
-rw-r--r--lisp/emacs-lisp/cl-seq.el7
2 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 60c52c26ca3..3a9280fae62 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -365,13 +365,6 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp
365(cl--defalias 'cl-second 'cadr) 365(cl--defalias 'cl-second 'cadr)
366(cl--defalias 'cl-rest 'cdr) 366(cl--defalias 'cl-rest 'cdr)
367 367
368(defun cl-endp (x)
369 "Return true if X is the empty list; false if it is a cons.
370Signal an error if X is not a list."
371 (if (listp x)
372 (null x)
373 (signal 'wrong-type-argument (list 'listp x))))
374
375(cl--defalias 'cl-third 'cl-caddr "Return the third element of the list X.") 368(cl--defalias 'cl-third 'cl-caddr "Return the third element of the list X.")
376(cl--defalias 'cl-fourth 'cl-cadddr "Return the fourth element of the list X.") 369(cl--defalias 'cl-fourth 'cl-cadddr "Return the fourth element of the list X.")
377 370
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 31ad8111858..3eb6ea16daf 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -113,6 +113,13 @@
113(defvar cl-key) 113(defvar cl-key)
114 114
115;;;###autoload 115;;;###autoload
116(defun cl-endp (x)
117 "Return true if X is the empty list; false if it is a cons.
118Signal an error if X is not a list."
119 (cl-check-type x list)
120 (null x))
121
122;;;###autoload
116(defun cl-reduce (cl-func cl-seq &rest cl-keys) 123(defun cl-reduce (cl-func cl-seq &rest cl-keys)
117 "Reduce two-argument FUNCTION across SEQ. 124 "Reduce two-argument FUNCTION across SEQ.
118\nKeywords supported: :start :end :from-end :initial-value :key 125\nKeywords supported: :start :end :from-end :initial-value :key