>>>> "SJT" == Stephen J Turnbull
<turnbull(a)sk.tsukuba.ac.jp> writes:
>>>> "vin" == Vin Shelton <acs(a)xemacs.org>
writes:
vin> You are correct that the lispref claims that concat takes an
vin> int, but that capability was taken out of XEmacs awhile ago,
vin> I think around 20.something.
SJT> I _was_ going to go fix the doc, but discovered more discrepancies.
SJT> Lispref says
SJT> (concat "abc" (list 120 (+ 256 121)) [122])
SJT> @result{} "abcxyz"
SJT> but in reality Mule does
SJT> oops ==> "abcx-Bůz"-A
SJT> (that's a Latin-2 character between x and z).
SJT> This is still considered a feature, right? --with-mule=no XEmacs does
SJT> as the manual says (computes the character modulo 256), right?
Yes. And Emacs has the same behavior we do (modulo differences in
character representation). I suggest we steal improvements from their
latest texi for concat (could you do this, Stephen?):
@defun concat &rest sequences
@cindex copying strings
@cindex concatenating strings
This function returns a new string consisting of the characters in the
arguments passed to it (along with their text properties, if any). The
arguments may be strings, lists of numbers, or vectors of numbers; they
are not themselves changed. If @code{concat} receives no arguments, it
returns an empty string.
@example
(concat "abc" "-def")
@result{} "abc-def"
(concat "abc" (list 120 121) [122])
@result{} "abcxyz"
;; @r{@code{nil} is an empty sequence.}
(concat "abc" nil "-def")
@result{} "abc-def"
(concat "The " "quick brown " "fox.")
@result{} "The quick brown fox."
(concat)
@result{} ""
@end example
@noindent
The @code{concat} function always constructs a new string that is
not @code{eq} to any existing string.
In Emacs versions before 21, when an argument was an integer (not a
sequence of integers), it was converted to a string of digits making up
the decimal printed representation of the integer. This obsolete usage
no longer works. The proper way to convert an integer to its decimal
printed form is with @code{format} (@pxref{Formatting Strings}) or
@code{number-to-string} (@pxref{String Conversion}).
For information about other concatenation functions, see the
description of @code{mapconcat} in @ref{Mapping Functions},
@code{vconcat} in @ref{Vectors}, and @code{append} in @ref{Building
Lists}.
@end defun