diff options
| author | Nicolas Petton | 2015-04-15 18:26:52 +0200 |
|---|---|---|
| committer | Nicolas Petton | 2015-04-15 18:29:15 +0200 |
| commit | a5dbb543cb3d3d0ef6774c410462ee33776810b2 (patch) | |
| tree | 267edffd15d96ad9c31bea2d706c23fe32b4e4af | |
| parent | 66ae3cff960606f96818e085226e05457d98a3cf (diff) | |
| download | emacs-a5dbb543cb3d3d0ef6774c410462ee33776810b2.tar.gz emacs-a5dbb543cb3d3d0ef6774c410462ee33776810b2.zip | |
Define cl-concatenate as an alias to seq-concatenate
* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Removes duplicated
code by making cl-concatenate an alias to seq-concatenate.
| -rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index afc2adbee6d..0a6bc3afda7 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el | |||
| @@ -528,13 +528,9 @@ If START or END is negative, it counts from the end." | |||
| 528 | (seq-subseq seq start end)) | 528 | (seq-subseq seq start end)) |
| 529 | 529 | ||
| 530 | ;;;###autoload | 530 | ;;;###autoload |
| 531 | (defun cl-concatenate (type &rest seqs) | 531 | (defalias 'cl-concatenate #'seq-concatenate |
| 532 | "Concatenate, into a sequence of type TYPE, the argument SEQUENCEs. | 532 | "Concatenate, into a sequence of type TYPE, the argument SEQUENCEs. |
| 533 | \n(fn TYPE SEQUENCE...)" | 533 | \n(fn TYPE SEQUENCE...)") |
| 534 | (cond ((eq type 'vector) (apply 'vconcat seqs)) | ||
| 535 | ((eq type 'string) (apply 'concat seqs)) | ||
| 536 | ((eq type 'list) (apply 'append (append seqs '(nil)))) | ||
| 537 | (t (error "Not a sequence type name: %s" type)))) | ||
| 538 | 534 | ||
| 539 | 535 | ||
| 540 | ;;; List functions. | 536 | ;;; List functions. |