Fixes (Bug#39761) by making cl-extra dependent on seq rather than
vice versa.
* lisp/emacs-lisp/seq.el (seq-concatenate): Move cl-concatenate's
code here instead of calling it.
* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use cl-concatenate.
Copyright-paperwork-exempt: yes
(defun cl-concatenate (type &rest sequences)
"Concatenate, into a sequence of type TYPE, the argument SEQUENCEs.
\n(fn TYPE SEQUENCE...)"
- (pcase type
- ('vector (apply #'vconcat sequences))
- ('string (apply #'concat sequences))
- ('list (apply #'append (append sequences '(nil))))
- (_ (error "Not a sequence type name: %S" type))))
+ (seq-concatenate type sequences))
;;; List functions.
TYPE must be one of following symbols: vector, string or list.
\n(fn TYPE SEQUENCE...)"
- (apply #'cl-concatenate type (seq-map #'seq-into-sequence sequences)))
+ (pcase type
+ ('vector (apply #'vconcat sequences))
+ ('string (apply #'concat sequences))
+ ('list (apply #'append (append sequences '(nil))))
+ (_ (error "Not a sequence type name: %S" type))))
(cl-defgeneric seq-into-sequence (sequence)
"Convert SEQUENCE into a sequence.