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.el80
1 files changed, 70 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 7a79488f1f5..6e51b895b46 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -115,6 +115,7 @@
(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."
+ (declare (side-effect-free t))
(cl-check-type x list)
(null x))
@@ -144,6 +145,7 @@ the SEQ moving forward, and the order of arguments to the
FUNCTION is also reversed.
\n(fn FUNCTION SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:from-end (:start 0) :end :initial-value :key) ()
(or (listp cl-seq) (setq cl-seq (append cl-seq nil)))
(setq cl-seq (cl-subseq cl-seq cl-start cl-end))
@@ -169,7 +171,7 @@ FUNCTION is also reversed.
(if (listp cl-seq)
(let ((p (nthcdr cl-start cl-seq))
(n (and cl-end (- cl-end cl-start))))
- (while (and p (or (null n) (>= (cl-decf n) 0)))
+ (while (and p (or (null n) (>= (decf n) 0)))
(setcar p cl-item)
(setq p (cdr p))))
(or cl-end (setq cl-end (length cl-seq)))
@@ -204,7 +206,7 @@ SEQ1 is destructively modified, then returned.
(min cl-n1 (- cl-end2 cl-start2)))
((and cl-n1 (null cl-end2)) cl-n1)
((and (null cl-n1) cl-end2) (- cl-end2 cl-start2)))))
- (while (and cl-p1 cl-p2 (or (null cl-n) (>= (cl-decf cl-n) 0)))
+ (while (and cl-p1 cl-p2 (or (null cl-n) (>= (decf cl-n) 0)))
(setcar cl-p1 (car cl-p2))
(setq cl-p1 (cdr cl-p1) cl-p2 (cdr cl-p2))))
(setq cl-end2 (if (null cl-n1)
@@ -234,6 +236,7 @@ This is a non-destructive function; it makes a copy of SEQ if necessary
to avoid corrupting the original SEQ.
\nKeywords supported: :test :test-not :key :count :start :end :from-end
\n(fn ITEM SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not :count :from-end
(:start 0) :end) ()
(let ((len (length cl-seq)))
@@ -281,6 +284,7 @@ This is a non-destructive function; it makes a copy of SEQ if necessary
to avoid corrupting the original SEQ.
\nKeywords supported: :key :count :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-remove nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -290,6 +294,7 @@ This is a non-destructive function; it makes a copy of SEQ if necessary
to avoid corrupting the original SEQ.
\nKeywords supported: :key :count :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-remove nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -298,6 +303,7 @@ to avoid corrupting the original SEQ.
This is a destructive function; it reuses the storage of SEQ whenever possible.
\nKeywords supported: :test :test-not :key :count :start :end :from-end
\n(fn ITEM SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not :count :from-end
(:start 0) :end) ()
(let ((len (length cl-seq)))
@@ -343,6 +349,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
This is a destructive function; it reuses the storage of SEQ whenever possible.
\nKeywords supported: :key :count :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-delete nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -351,6 +358,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
This is a destructive function; it reuses the storage of SEQ whenever possible.
\nKeywords supported: :key :count :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-delete nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -358,6 +366,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
"Return a copy of SEQ with all duplicate elements removed.
\nKeywords supported: :test :test-not :key :start :end :from-end
\n(fn SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--delete-duplicates cl-seq cl-keys t))
;;;###autoload
@@ -365,6 +374,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
"Remove all duplicate elements from SEQ (destructively).
\nKeywords supported: :test :test-not :key :start :end :from-end
\n(fn SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--delete-duplicates cl-seq cl-keys nil))
(defun cl--delete-duplicates (cl-seq cl-keys cl-copy)
@@ -416,6 +426,7 @@ This is a non-destructive function; it makes a copy of SEQ if necessary
to avoid corrupting the original SEQ.
\nKeywords supported: :test :test-not :key :count :start :end :from-end
\n(fn NEW OLD SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not :count
(:start 0) :end :from-end) ()
(if (or (eq cl-old cl-new)
@@ -428,8 +439,8 @@ to avoid corrupting the original SEQ.
(setq cl-seq (copy-sequence cl-seq))
(unless cl-from-end
(setf (elt cl-seq cl-i) cl-new)
- (cl-incf cl-i)
- (cl-decf cl-count))
+ (incf cl-i)
+ (decf cl-count))
(apply 'cl-nsubstitute cl-new cl-old cl-seq :count cl-count
:start cl-i cl-keys))))))
@@ -440,6 +451,7 @@ This is a non-destructive function; it makes a copy of SEQ if necessary
to avoid corrupting the original SEQ.
\nKeywords supported: :key :count :start :end :from-end
\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-substitute cl-new nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -449,6 +461,7 @@ This is a non-destructive function; it makes a copy of SEQ if necessary
to avoid corrupting the original SEQ.
\nKeywords supported: :key :count :start :end :from-end
\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-substitute cl-new nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -457,6 +470,7 @@ to avoid corrupting the original SEQ.
This is a destructive function; it reuses the storage of SEQ whenever possible.
\nKeywords supported: :test :test-not :key :count :start :end :from-end
\n(fn NEW OLD SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not :count
(:start 0) :end :from-end) ()
(let* ((cl-seq (if (stringp seq) (string-to-vector seq) seq))
@@ -493,6 +507,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
This is a destructive function; it reuses the storage of SEQ whenever possible.
\nKeywords supported: :key :count :start :end :from-end
\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-nsubstitute cl-new nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -501,6 +516,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
This is a destructive function; it reuses the storage of SEQ whenever possible.
\nKeywords supported: :key :count :start :end :from-end
\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-nsubstitute cl-new nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -509,6 +525,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
Return the matching ITEM, or nil if not found.
\nKeywords supported: :test :test-not :key :start :end :from-end
\n(fn ITEM SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(let ((cl-pos (apply 'cl-position cl-item cl-seq cl-keys)))
(and cl-pos (elt cl-seq cl-pos))))
@@ -518,6 +535,7 @@ Return the matching ITEM, or nil if not found.
Return the matching item, or nil if not found.
\nKeywords supported: :key :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-find nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -526,6 +544,7 @@ Return the matching item, or nil if not found.
Return the matching item, or nil if not found.
\nKeywords supported: :key :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-find nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -534,6 +553,7 @@ Return the matching item, or nil if not found.
Return the index of the matching item, or nil if not found.
\nKeywords supported: :test :test-not :key :start :end :from-end
\n(fn ITEM SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not
(:start 0) :end :from-end) ()
(cl--position cl-item cl-seq cl-start cl-end cl-from-end)))
@@ -564,6 +584,7 @@ Return the index of the matching item, or nil if not found.
Return the index of the matching item, or nil if not found.
\nKeywords supported: :key :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-position nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -572,6 +593,7 @@ Return the index of the matching item, or nil if not found.
Return the index of the matching item, or nil if not found.
\nKeywords supported: :key :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-position nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -579,6 +601,7 @@ Return the index of the matching item, or nil if not found.
"Count the number of occurrences of ITEM in SEQ.
\nKeywords supported: :test :test-not :key :start :end
\n(fn ITEM SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not (:start 0) :end) ()
(let ((cl-count 0) cl-x)
(or cl-end (setq cl-end (length cl-seq)))
@@ -594,6 +617,7 @@ Return the index of the matching item, or nil if not found.
"Count the number of items satisfying PREDICATE in SEQ.
\nKeywords supported: :key :start :end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-count nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -601,6 +625,7 @@ Return the index of the matching item, or nil if not found.
"Count the number of items not satisfying PREDICATE in SEQ.
\nKeywords supported: :key :start :end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-count nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -610,6 +635,7 @@ Return nil if the sequences match. If one sequence is a prefix of the
other, the return value indicates the end of the shorter sequence.
\nKeywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end
\n(fn SEQ1 SEQ2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :from-end
(:start1 0) :end1 (:start2 0) :end2) ()
(or cl-end1 (setq cl-end1 (length cl-seq1)))
@@ -641,6 +667,7 @@ Return the index of the leftmost element of the first match found;
return nil if there are no matches.
\nKeywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end
\n(fn SEQ1 SEQ2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :from-end
(:start1 0) :end1 (:start2 0) :end2) ()
(or cl-end1 (setq cl-end1 (length cl-seq1)))
@@ -667,6 +694,9 @@ return nil if there are no matches.
This is a destructive function; it reuses the storage of SEQ if possible.
\nKeywords supported: :key
\n(fn SEQ PREDICATE [KEYWORD VALUE]...)"
+ ;; It's safe to ignore the return value when used on arrays,
+ ;; but most calls pass lists.
+ (declare (important-return-value t))
(if (nlistp cl-seq)
(if (stringp cl-seq)
(concat (apply #'cl-sort (vconcat cl-seq) cl-pred cl-keys))
@@ -685,6 +715,9 @@ This is a destructive function; it reuses the storage of SEQ if possible.
This is a destructive function; it reuses the storage of SEQ if possible.
\nKeywords supported: :key
\n(fn SEQ PREDICATE [KEYWORD VALUE]...)"
+ ;; It's safe to ignore the return value when used on arrays,
+ ;; but most calls pass lists.
+ (declare (important-return-value t))
(apply 'cl-sort cl-seq cl-pred cl-keys))
;;;###autoload
@@ -694,6 +727,7 @@ TYPE is the sequence type to return, SEQ1 and SEQ2 are the two argument
sequences, and PREDICATE is a `less-than' predicate on the elements.
\nKeywords supported: :key
\n(fn TYPE SEQ1 SEQ2 PREDICATE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(or (listp cl-seq1) (setq cl-seq1 (append cl-seq1 nil)))
(or (listp cl-seq2) (setq cl-seq2 (append cl-seq2 nil)))
(cl--parsing-keywords (:key) ()
@@ -711,7 +745,8 @@ sequences, and PREDICATE is a `less-than' predicate on the elements.
Return the sublist of LIST whose car is ITEM.
\nKeywords supported: :test :test-not :key
\n(fn ITEM LIST [KEYWORD VALUE]...)"
- (declare (compiler-macro cl--compiler-macro-member))
+ (declare (important-return-value t)
+ (compiler-macro cl--compiler-macro-member))
(if cl-keys
(cl--parsing-keywords (:test :test-not :key :if :if-not) ()
(while (and cl-list (not (cl--check-test cl-item (car cl-list))))
@@ -726,6 +761,7 @@ Return the sublist of LIST whose car is ITEM.
Return the sublist of LIST whose car matches.
\nKeywords supported: :key
\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-member nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -734,6 +770,7 @@ Return the sublist of LIST whose car matches.
Return the sublist of LIST whose car matches.
\nKeywords supported: :key
\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-member nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -748,7 +785,8 @@ Return the sublist of LIST whose car matches.
"Find the first item whose car matches ITEM in LIST.
\nKeywords supported: :test :test-not :key
\n(fn ITEM LIST [KEYWORD VALUE]...)"
- (declare (compiler-macro cl--compiler-macro-assoc))
+ (declare (important-return-value t)
+ (compiler-macro cl--compiler-macro-assoc))
(if cl-keys
(cl--parsing-keywords (:test :test-not :key :if :if-not) ()
(while (and cl-alist
@@ -766,6 +804,7 @@ Return the sublist of LIST whose car matches.
"Find the first item whose car satisfies PREDICATE in LIST.
\nKeywords supported: :key
\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-assoc nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -773,6 +812,7 @@ Return the sublist of LIST whose car matches.
"Find the first item whose car does not satisfy PREDICATE in LIST.
\nKeywords supported: :key
\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-assoc nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -780,6 +820,7 @@ Return the sublist of LIST whose car matches.
"Find the first item whose cdr matches ITEM in LIST.
\nKeywords supported: :test :test-not :key
\n(fn ITEM LIST [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(if (or cl-keys (numberp cl-item))
(cl--parsing-keywords (:test :test-not :key :if :if-not) ()
(while (and cl-alist
@@ -794,6 +835,7 @@ Return the sublist of LIST whose car matches.
"Find the first item whose cdr satisfies PREDICATE in LIST.
\nKeywords supported: :key
\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-rassoc nil cl-list :if cl-pred cl-keys))
;;;###autoload
@@ -801,6 +843,7 @@ Return the sublist of LIST whose car matches.
"Find the first item whose cdr does not satisfy PREDICATE in LIST.
\nKeywords supported: :key
\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-rassoc nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
@@ -811,6 +854,7 @@ This is a non-destructive function; it makes a copy of the data if necessary
to avoid corrupting the original LIST1 and LIST2.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
((and (not cl-keys) (equal cl-list1 cl-list2)) cl-list1)
(t
@@ -833,6 +877,7 @@ This is a destructive function; it reuses the storage of LIST1 and LIST2
whenever possible.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
(t (apply 'cl-union cl-list1 cl-list2 cl-keys))))
@@ -844,6 +889,7 @@ This is a non-destructive function; it makes a copy of the data if necessary
to avoid corrupting the original LIST1 and LIST2.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(and cl-list1 cl-list2
(if (equal cl-list1 cl-list2) cl-list1
(cl--parsing-keywords (:key) (:test :test-not)
@@ -863,10 +909,11 @@ to avoid corrupting the original LIST1 and LIST2.
(defun cl-nintersection (cl-list1 cl-list2 &rest cl-keys)
"Combine LIST1 and LIST2 using a set-intersection operation.
The resulting list contains all items that appear in both LIST1 and LIST2.
-This is a destructive function; it reuses the storage of LIST1 and LIST2
-whenever possible.
+This is a destructive function; it reuses the storage of LIST1 (but not
+LIST2) whenever possible.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(and cl-list1 cl-list2 (apply 'cl-intersection cl-list1 cl-list2 cl-keys)))
;;;###autoload
@@ -877,6 +924,7 @@ This is a non-destructive function; it makes a copy of the data if necessary
to avoid corrupting the original LIST1 and LIST2.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(if (or (null cl-list1) (null cl-list2)) cl-list1
(cl--parsing-keywords (:key) (:test :test-not)
(let ((cl-res nil))
@@ -893,10 +941,11 @@ to avoid corrupting the original LIST1 and LIST2.
(defun cl-nset-difference (cl-list1 cl-list2 &rest cl-keys)
"Combine LIST1 and LIST2 using a set-difference operation.
The resulting list contains all items that appear in LIST1 but not LIST2.
-This is a destructive function; it reuses the storage of LIST1 and LIST2
-whenever possible.
+This is a destructive function; it reuses the storage of LIST1 (but not
+LIST2) whenever possible.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(if (or (null cl-list1) (null cl-list2)) cl-list1
(apply 'cl-set-difference cl-list1 cl-list2 cl-keys)))
@@ -908,6 +957,7 @@ This is a non-destructive function; it makes a copy of the data if necessary
to avoid corrupting the original LIST1 and LIST2.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
((equal cl-list1 cl-list2) nil)
(t (append (apply 'cl-set-difference cl-list1 cl-list2 cl-keys)
@@ -921,6 +971,7 @@ This is a destructive function; it reuses the storage of LIST1 and LIST2
whenever possible.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
((equal cl-list1 cl-list2) nil)
(t (nconc (apply 'cl-nset-difference cl-list1 cl-list2 cl-keys)
@@ -932,6 +983,7 @@ whenever possible.
I.e., if every element of LIST1 also appears in LIST2.
\nKeywords supported: :test :test-not :key
\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cond ((null cl-list1) t) ((null cl-list2) nil)
((equal cl-list1 cl-list2) t)
(t (cl--parsing-keywords (:key) (:test :test-not)
@@ -947,6 +999,7 @@ I.e., if every element of LIST1 also appears in LIST2.
Return a copy of TREE with all matching elements replaced by NEW.
\nKeywords supported: :key
\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-sublis (list (cons nil cl-new)) cl-tree :if cl-pred cl-keys))
;;;###autoload
@@ -955,6 +1008,7 @@ Return a copy of TREE with all matching elements replaced by NEW.
Return a copy of TREE with all non-matching elements replaced by NEW.
\nKeywords supported: :key
\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-sublis (list (cons nil cl-new)) cl-tree :if-not cl-pred cl-keys))
;;;###autoload
@@ -964,6 +1018,7 @@ Any element of TREE which is `eql' to OLD is changed to NEW (via a call
to `setcar').
\nKeywords supported: :test :test-not :key
\n(fn NEW OLD TREE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-nsublis (list (cons cl-old cl-new)) cl-tree cl-keys))
;;;###autoload
@@ -972,6 +1027,7 @@ to `setcar').
Any element of TREE which matches is changed to NEW (via a call to `setcar').
\nKeywords supported: :key
\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-nsublis (list (cons nil cl-new)) cl-tree :if cl-pred cl-keys))
;;;###autoload
@@ -980,6 +1036,7 @@ Any element of TREE which matches is changed to NEW (via a call to `setcar').
Any element of TREE which matches is changed to NEW (via a call to `setcar').
\nKeywords supported: :key
\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(apply 'cl-nsublis (list (cons nil cl-new)) cl-tree :if-not cl-pred cl-keys))
(defvar cl--alist)
@@ -990,6 +1047,7 @@ Any element of TREE which matches is changed to NEW (via a call to `setcar').
Return a copy of TREE with all matching elements replaced.
\nKeywords supported: :test :test-not :key
\n(fn ALIST TREE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not) ()
(let ((cl--alist cl-alist))
(cl--sublis-rec cl-tree))))
@@ -1013,6 +1071,7 @@ Return a copy of TREE with all matching elements replaced.
Any matching element of TREE is changed via a call to `setcar'.
\nKeywords supported: :test :test-not :key
\n(fn ALIST TREE [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key :if :if-not) ()
(let ((cl-hold (list cl-tree))
(cl--alist cl-alist))
@@ -1039,6 +1098,7 @@ Any matching element of TREE is changed via a call to `setcar'.
Atoms are compared by `eql'; cons cells are compared recursively.
\nKeywords supported: :test :test-not :key
\n(fn TREE1 TREE2 [KEYWORD VALUE]...)"
+ (declare (important-return-value t))
(cl--parsing-keywords (:test :test-not :key) ()
(cl--tree-equal-rec cl-x cl-y)))