diff options
| author | Stefan Kangas | 2021-10-05 15:36:31 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2021-10-05 15:38:38 +0200 |
| commit | d652efcd087099c71cd76c4bbf2bbf04314844b4 (patch) | |
| tree | 828ea43e01d213d00ec2832d7c877d246f9328e6 /src/fns.c | |
| parent | 4bf532ee82473740cfd43c66ecbfe6cfddf99df9 (diff) | |
| download | emacs-d652efcd087099c71cd76c4bbf2bbf04314844b4.tar.gz emacs-d652efcd087099c71cd76c4bbf2bbf04314844b4.zip | |
Make 'mapconcat' argument 'separator' optional
* src/fns.c (Fmapconcat): Make third 'separator' argument
optional. (Bug#50965)
* doc/lispref/functions.texi (Mapping Functions): Update
documentation for above change.
* test/src/fns-tests.el (fns-tests-mapconcat): New test.
* doc/misc/cl.texi (Obsolete Setf Customization): Don't use third
mapconcat argument in example.
* lisp/emacs-lisp/subr-x.el (string-join): Doc fix.
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -2852,12 +2852,16 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) | |||
| 2852 | return leni; | 2852 | return leni; |
| 2853 | } | 2853 | } |
| 2854 | 2854 | ||
| 2855 | DEFUN ("mapconcat", Fmapconcat, Smapconcat, 3, 3, 0, | 2855 | DEFUN ("mapconcat", Fmapconcat, Smapconcat, 2, 3, 0, |
| 2856 | doc: /* Apply FUNCTION to each element of SEQUENCE, and concat the results as strings. | 2856 | doc: /* Apply FUNCTION to each element of SEQUENCE, and concat the results as strings. |
| 2857 | In between each pair of results, stick in SEPARATOR. Thus, " " as | 2857 | In between each pair of results, stick in SEPARATOR. Thus, " " as |
| 2858 | SEPARATOR results in spaces between the values returned by FUNCTION. | 2858 | SEPARATOR results in spaces between the values returned by FUNCTION. |
| 2859 | |||
| 2859 | SEQUENCE may be a list, a vector, a bool-vector, or a string. | 2860 | SEQUENCE may be a list, a vector, a bool-vector, or a string. |
| 2860 | SEPARATOR must be a string, a vector, or a list of characters. | 2861 | |
| 2862 | Optional argument SEPARATOR must be a string, a vector, or a list of | ||
| 2863 | characters; nil stands for the empty string. | ||
| 2864 | |||
| 2861 | FUNCTION must be a function of one argument, and must return a value | 2865 | FUNCTION must be a function of one argument, and must return a value |
| 2862 | that is a sequence of characters: either a string, or a vector or | 2866 | that is a sequence of characters: either a string, or a vector or |
| 2863 | list of numbers that are valid character codepoints. */) | 2867 | list of numbers that are valid character codepoints. */) |