unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: 42296@debbugs.gnu.org
Subject: bug#42296: 27.0.91; Correct manual entry for 'concat' w.r.t. allocation [PATCH]
Date: Thu, 9 Jul 2020 17:54:10 +0200	[thread overview]
Message-ID: <B6E7E780-B9D0-476E-854E-7C9A1A420269@acm.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

'concat' hasn't guaranteed the allocation of a new string since 1997 at least (79d137ffe7d). Remove claims to the contrary from the manual.


[-- Attachment #2: 0001-Correct-concat-manual-entry.patch --]
[-- Type: application/octet-stream, Size: 1658 bytes --]

From 3c6d4f9cefc7571df26e390b94f1c39da08a78e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Thu, 9 Jul 2020 17:32:13 +0200
Subject: [PATCH] Correct 'concat' manual entry

* doc/lispref/strings.texi (Creating Strings): 'concat' does not
necessarily return a newly allocated string.  This has been the case
at least since 1997 (Emacs 20.3).
---
 doc/lispref/strings.texi | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 2ef88b9025..0aab326dc7 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -248,7 +248,7 @@ Creating Strings
 @defun concat &rest sequences
 @cindex copying strings
 @cindex concatenating strings
-This function returns a new string consisting of the characters in the
+This function returns a 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
@@ -269,10 +269,6 @@ Creating Strings
 @end example
 
 @noindent
-This function always constructs a new string that is not @code{eq} to
-any existing string, except when the result is the empty string (to
-save space, Emacs makes only one empty multibyte string).
-
 For information about other concatenation functions, see the
 description of @code{mapconcat} in @ref{Mapping Functions},
 @code{vconcat} in @ref{Vector Functions}, and @code{append} in @ref{Building
-- 
2.21.1 (Apple Git-122.3)


             reply	other threads:[~2020-07-09 15:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 15:54 Mattias Engdegård [this message]
2020-07-09 17:31 ` bug#42296: 27.0.91; Correct manual entry for 'concat' w.r.t. allocation [PATCH] Eli Zaretskii
2020-07-09 17:56   ` Mattias Engdegård
2020-07-09 18:51     ` Eli Zaretskii
2020-07-09 19:17       ` Mattias Engdegård
2020-07-09 19:24         ` Eli Zaretskii
2020-07-10 17:04           ` Mattias Engdegård
2020-07-10 18:08             ` Eli Zaretskii
2020-07-11 11:15               ` Mattias Engdegård
2020-07-11 11:52                 ` Eli Zaretskii
2020-07-11 12:51                   ` Mattias Engdegård
2020-07-11 13:07                     ` Eli Zaretskii
2020-07-11 13:16                       ` Mattias Engdegård
2020-07-11 13:37                         ` Eli Zaretskii
2020-07-11 13:47                           ` Mattias Engdegård
2020-07-11 16:17                       ` Drew Adams
2020-07-12  3:03                       ` Richard Stallman
2020-07-09 19:20       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B6E7E780-B9D0-476E-854E-7C9A1A420269@acm.org \
    --to=mattiase@acm.org \
    --cc=42296@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).