From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#42296: 27.0.91; Correct manual entry for 'concat' w.r.t. allocation [PATCH] Date: Thu, 9 Jul 2020 19:56:59 +0200 Message-ID: <669987BB-B825-4C2C-B9FD-31F04E0D6013@acm.org> References: <83wo3cppc5.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_F5C8CD57-08AA-452C-9564-2DC9FB330F35" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25472"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42296@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 09 19:58:39 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtaog-0006VH-Pd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 19:58:38 +0200 Original-Received: from localhost ([::1]:33438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtaof-0004Cf-PV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 13:58:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtao6-0003FI-65 for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 13:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58325) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtao5-00012Q-S8 for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 13:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtao5-0001rw-Rs for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 13:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 17:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42296 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 42296-submit@debbugs.gnu.org id=B42296.15943174327119 (code B ref 42296); Thu, 09 Jul 2020 17:58:01 +0000 Original-Received: (at 42296) by debbugs.gnu.org; 9 Jul 2020 17:57:12 +0000 Original-Received: from localhost ([127.0.0.1]:41638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtanI-0001ql-G4 for submit@debbugs.gnu.org; Thu, 09 Jul 2020 13:57:12 -0400 Original-Received: from mail1446c50.megamailservers.eu ([91.136.14.46]:37426 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtanG-0001qP-5W for 42296@debbugs.gnu.org; Thu, 09 Jul 2020 13:57:11 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1594317422; bh=WRGgLP5Dq+YPi/imaZoL+YPgubVyfTu5d6ljc5AQnIY=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=sAhUA/Gbvpcdffr3fpWNyrxnfLb76qbi3GVp+jR6D4o61P3+oxscncDRHOytU48ZL 1ES/C3muuUvVo4pgEt/2ycUp5qYaCEWUK4X7pmYgfEsIKXXxRJ1guHmwLVRyndtI1Z k+ClI3HXTRoZFg1t3BWx5WgElemKOQ1kd4uYWCww= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 069Hv01b006451; Thu, 9 Jul 2020 17:57:01 +0000 In-Reply-To: <83wo3cppc5.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F1B.5F075A6E.002C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=D5w51cZj c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=6j5M9Ft6w2J5WWEkYPcA:9 a=CjuIK1q_8ugA:10 a=FHrI4yowtIExUguvRmkA:9 a=B2y7HmGcmWMA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182872 Archived-At: --Apple-Mail=_F5C8CD57-08AA-452C-9564-2DC9FB330F35 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 9 juli 2020 kl. 19.31 skrev Eli Zaretskii : > This loses too much useful information, IMO. Let's please say that > the result is sometimes ("frequently"?), but not always, a new string, > and that programs should not rely on that aspect. Here is a new version that adds this information, and recommends = copy-sequence for mutability. --Apple-Mail=_F5C8CD57-08AA-452C-9564-2DC9FB330F35 Content-Disposition: attachment; filename=0001-Correct-concat-manual-entry.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Correct-concat-manual-entry.patch" Content-Transfer-Encoding: quoted-printable =46rom=204fcd3b13509ab94ddd552d3478c7c3cd9fe95279=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=209=20Jul=202020=2017:32:13=20+0200=0A= Subject:=20[PATCH]=20Correct=20'concat'=20manual=20entry=0A=0A*=20= doc/lispref/strings.texi=20(Creating=20Strings):=20'concat'=20does=20not=0A= necessarily=20return=20a=20newly=20allocated=20string.=20=20This=20has=20= been=20the=20case=0Aat=20least=20since=201997=20(Emacs=2020.3).=0A---=0A=20= doc/lispref/strings.texi=20|=208=20++++----=0A=201=20file=20changed,=204=20= insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/doc/lispref/strings.texi=20b/doc/lispref/strings.texi=0Aindex=20= 2ef88b9025..455f3efc27=20100644=0A---=20a/doc/lispref/strings.texi=0A+++=20= b/doc/lispref/strings.texi=0A@@=20-248,7=20+248,7=20@@=20Creating=20= Strings=0A=20@defun=20concat=20&rest=20sequences=0A=20@cindex=20copying=20= strings=0A=20@cindex=20concatenating=20strings=0A-This=20function=20= returns=20a=20new=20string=20consisting=20of=20the=20characters=20in=20= the=0A+This=20function=20returns=20a=20string=20consisting=20of=20the=20= characters=20in=20the=0A=20arguments=20passed=20to=20it=20(along=20with=20= their=20text=20properties,=20if=20any).=20=20The=0A=20arguments=20may=20= be=20strings,=20lists=20of=20numbers,=20or=20vectors=20of=20numbers;=20= they=0A=20are=20not=20themselves=20changed.=20=20If=20@code{concat}=20= receives=20no=20arguments,=20it=0A@@=20-269,9=20+269,9=20@@=20Creating=20= Strings=0A=20@end=20example=0A=20=0A=20@noindent=0A-This=20function=20= always=20constructs=20a=20new=20string=20that=20is=20not=20@code{eq}=20= to=0A-any=20existing=20string,=20except=20when=20the=20result=20is=20the=20= empty=20string=20(to=0A-save=20space,=20Emacs=20makes=20only=20one=20= empty=20multibyte=20string).=0A+The=20returned=20string=20cannot=20be=20= relied=20upon=20to=20be=20unique=20or=20newly=0A+allocated;=20it=20= should=20be=20considered=20immutable.=20=20Use=0A+@code{copy-sequence}=20= on=20the=20result=20if=20a=20mutable=20string=20is=20needed.=0A=20=0A=20= For=20information=20about=20other=20concatenation=20functions,=20see=20= the=0A=20description=20of=20@code{mapconcat}=20in=20@ref{Mapping=20= Functions},=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_F5C8CD57-08AA-452C-9564-2DC9FB330F35--