Function: cl-substitute-if
cl-substitute-if is an autoloaded and byte-compiled function defined
in cl-seq.el.gz.
Signature
(cl-substitute-if NEW PREDICATE SEQ [KEYWORD VALUE]...)
Documentation
Substitute NEW for all items satisfying PREDICATE in SEQ.
This is a non-destructive function; it makes a copy of SEQ if necessary to avoid corrupting the original SEQ.
Keywords supported: :key :count :start :end :from-end
Aliases
substitute-if (obsolete since 27.1)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-seq.el.gz
;;;###autoload
(defun cl-substitute-if (new pred seq &rest cl-keys)
"Substitute NEW for all items satisfying PREDICATE in SEQ.
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 new nil seq :if pred cl-keys))