summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-seq.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/cl-seq.el')
-rw-r--r--lisp/emacs-lisp/cl-seq.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 31ad8111858..a15c994bc1a 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -113,6 +113,13 @@
(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.
\nKeywords supported: :start :end :from-end :initial-value :key
@@ -696,9 +703,7 @@ Return the sublist of LIST whose car is ITEM.
(while (and cl-list (not (cl--check-test cl-item (car cl-list))))
(setq cl-list (cdr cl-list)))
cl-list)
- (if (and (numberp cl-item) (not (integerp cl-item)))
- (member cl-item cl-list)
- (memq cl-item cl-list))))
+ (memql cl-item cl-list)))
(autoload 'cl--compiler-macro-member "cl-macs")
;;;###autoload
@@ -737,7 +742,7 @@ Return the sublist of LIST whose car matches.
(not (cl--check-test cl-item (car (car cl-alist))))))
(setq cl-alist (cdr cl-alist)))
(and cl-alist (car cl-alist)))
- (if (and (numberp cl-item) (not (integerp cl-item)))
+ (if (and (numberp cl-item) (not (fixnump cl-item)))
(assoc cl-item cl-alist)
(assq cl-item cl-alist))))
(autoload 'cl--compiler-macro-assoc "cl-macs")
@@ -1033,7 +1038,6 @@ Atoms are compared by `eql'; cons cells are compared recursively.
(run-hooks 'cl-seq-load-hook)
;; Local variables:
-;; byte-compile-dynamic: t
;; generated-autoload-file: "cl-loaddefs.el"
;; End: