bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42296: 27.0.91; Correct manual entry for 'concat' w.r.t. allocation


From: Mattias Engdegård
Subject: bug#42296: 27.0.91; Correct manual entry for 'concat' w.r.t. allocation [PATCH]
Date: Sat, 11 Jul 2020 13:15:39 +0200

10 juli 2020 kl. 20.08 skrev Eli Zaretskii <eliz@gnu.org>:

> Fine with me, except that "should not be altered": I object to that,
> unless we explain why.  My proposed text included such an explanation;
> without it, this looks like another dogma that someone sooner or later
> will come up and challenge.

Let's try again then, elaborating the second paragraph:

 This function does not always allocate a new string.  Callers should
 not rely on the result being a new string nor on it being @code{eq}
 to an existing string.

 In particular, the returned value should not be altered, because doing
 so may inadvertently change another string, alter a constant string in
 the program, or even raise an error.  To obtain a string that can be
 mutated, use @code{copy-sequence} on the result.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]