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.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 31ad8111858..87c02a6b54f 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")