summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrew Eggenberger <andrew.eggenberger@gmail.com>2020-02-27 21:43:47 -0600
committerNoam Postavsky <npostavs@gmail.com>2020-03-07 18:39:01 -0500
commit3cbf4cb79600ade39a186f31448e56e0e6fdd364 (patch)
tree3ba5917b69d4e1c55f58bff11ff15c6d2d25e037 /lisp/emacs-lisp
parent363d927086dbdc4e5073393889b76eb0470785f4 (diff)
downloademacs-3cbf4cb79600ade39a186f31448e56e0e6fdd364.tar.gz
emacs-3cbf4cb79600ade39a186f31448e56e0e6fdd364.tar.bz2
emacs-3cbf4cb79600ade39a186f31448e56e0e6fdd364.zip
Eliminate use of cl-concatenate in 'seq' package
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
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/cl-extra.el6
-rw-r--r--lisp/emacs-lisp/seq.el6
2 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index e3dabdfcef2..e9bfe8df5f2 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -556,11 +556,7 @@ too large if positive or too small if negative)."
(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.
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 0b946dd7365..629a7a5fb30 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -285,7 +285,11 @@ sorted. FUNCTION must be a function of one argument."
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.