diff options
| -rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/seq.el | 6 |
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)." | |||
| 556 | (defun cl-concatenate (type &rest sequences) | 556 | (defun cl-concatenate (type &rest sequences) |
| 557 | "Concatenate, into a sequence of type TYPE, the argument SEQUENCEs. | 557 | "Concatenate, into a sequence of type TYPE, the argument SEQUENCEs. |
| 558 | \n(fn TYPE SEQUENCE...)" | 558 | \n(fn TYPE SEQUENCE...)" |
| 559 | (pcase type | 559 | (seq-concatenate type sequences)) |
| 560 | ('vector (apply #'vconcat sequences)) | ||
| 561 | ('string (apply #'concat sequences)) | ||
| 562 | ('list (apply #'append (append sequences '(nil)))) | ||
| 563 | (_ (error "Not a sequence type name: %S" type)))) | ||
| 564 | 560 | ||
| 565 | ;;; List functions. | 561 | ;;; List functions. |
| 566 | 562 | ||
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." | |||
| 285 | TYPE must be one of following symbols: vector, string or list. | 285 | TYPE must be one of following symbols: vector, string or list. |
| 286 | 286 | ||
| 287 | \n(fn TYPE SEQUENCE...)" | 287 | \n(fn TYPE SEQUENCE...)" |
| 288 | (apply #'cl-concatenate type (seq-map #'seq-into-sequence sequences))) | 288 | (pcase type |
| 289 | ('vector (apply #'vconcat sequences)) | ||
| 290 | ('string (apply #'concat sequences)) | ||
| 291 | ('list (apply #'append (append sequences '(nil)))) | ||
| 292 | (_ (error "Not a sequence type name: %S" type)))) | ||
| 289 | 293 | ||
| 290 | (cl-defgeneric seq-into-sequence (sequence) | 294 | (cl-defgeneric seq-into-sequence (sequence) |
| 291 | "Convert SEQUENCE into a sequence. | 295 | "Convert SEQUENCE into a sequence. |