diff options
| author | Nicolas Petton | 2015-03-09 12:46:29 +0100 |
|---|---|---|
| committer | Nicolas Petton | 2015-03-09 12:50:24 +0100 |
| commit | b7ed48c3ce8e77acc08d4948684333bef3238d2d (patch) | |
| tree | f391b49af05d99cdde85b933bdaeb1e6598d146c /doc | |
| parent | 8854b9cf5283cac3e4a5a3726325a82b88c1fcb5 (diff) | |
| download | emacs-b7ed48c3ce8e77acc08d4948684333bef3238d2d.tar.gz emacs-b7ed48c3ce8e77acc08d4948684333bef3238d2d.zip | |
Add seq-into as a public function
* lisp/emacs-lisp/seq.el: Make seq-into a public function (replacing
seq--into)
* test/automated/seq-tests.el: Add tests for seq-into
* doc/lispref/sequences.texi: Add documentation for seq-into
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/sequences.texi | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 42bff7c865a..260656c6cf7 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-03-09 Nicolas Petton <nicolas@petton.fr> | ||
| 2 | |||
| 3 | * sequences.texi (seq-into): Add documentation for the new | ||
| 4 | seq-into function. | ||
| 5 | |||
| 1 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | 6 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * processes.texi (Synchronous Processes): Update documentation of | 8 | * processes.texi (Synchronous Processes): Update documentation of |
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 04404f886e0..1af353590cf 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi | |||
| @@ -740,6 +740,28 @@ of @var{sequence}. Keys are compared using @code{equal}. | |||
| 740 | @end example | 740 | @end example |
| 741 | @end defun | 741 | @end defun |
| 742 | 742 | ||
| 743 | @defun seq-into sequence type | ||
| 744 | This function converts the sequence @var{sequence} into a sequence | ||
| 745 | of type @var{type}. @var{type} can be one of the following symbols: | ||
| 746 | @code{vector}, @code{string} or @code{list}. | ||
| 747 | |||
| 748 | @example | ||
| 749 | @group | ||
| 750 | (seq-into [1 2 3] 'list) | ||
| 751 | @result{} (1 2 3) | ||
| 752 | @end group | ||
| 753 | @group | ||
| 754 | (seq-into nil 'vector) | ||
| 755 | @result{} [] | ||
| 756 | @end group | ||
| 757 | @group | ||
| 758 | (seq-into "hello" 'vector) | ||
| 759 | @result{} [104 101 108 108 111] | ||
| 760 | @end group | ||
| 761 | @end example | ||
| 762 | @end defun | ||
| 763 | |||
| 764 | |||
| 743 | @defmac seq-doseq (var sequence [result]) body@dots{} | 765 | @defmac seq-doseq (var sequence [result]) body@dots{} |
| 744 | @cindex sequence iteration | 766 | @cindex sequence iteration |
| 745 | This macro is like @code{dolist}, except that @var{sequence} can be a list, | 767 | This macro is like @code{dolist}, except that @var{sequence} can be a list, |