From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: master 583cb26 2/3: Improve accuracy in string-replace description (bug#43598) Date: Mon, 28 Sep 2020 11:59:43 +0200 Message-ID: <9B45E488-F245-4A94-A492-C60B617A734B@acm.org> References: <20200927124520.25321.62354@vcs0.savannah.gnu.org> <20200927124522.BA20F207E0@vcs0.savannah.gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7333"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 28 12:02:37 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kMpzQ-0001nr-Ti for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Sep 2020 12:02:37 +0200 Original-Received: from localhost ([::1]:56178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMpzP-00078L-Up for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Sep 2020 06:02:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMpwn-0005hG-DX for emacs-devel@gnu.org; Mon, 28 Sep 2020 05:59:53 -0400 Original-Received: from mail237c50.megamailservers.eu ([91.136.10.247]:35998 helo=mail56c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMpwk-0008D2-Bm for emacs-devel@gnu.org; Mon, 28 Sep 2020 05:59:53 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1601287185; bh=ibO77MG+UFS1hhazTvp3KrXOoKgRMGmv94cNCLIy0es=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=snG7aRHFni6cc3O6VxTCem4oOvzXD/hkxe3R2SkfdVtZp/Qbm0/gHXhLXvLlhoe+z GWFbvkS2iOeq+TuUiNpmAM5D0htOzWlIKp0RKKEE8tD6aZLbGG62TMb4Wjpl3fWLhu 30A9vvZ8jo9QihwYJIK/3LmoxYxyIh/Q5/LZm3kE= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08S9xhhD030913; Mon, 28 Sep 2020 09:59:45 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F27.5F71B411.0062, 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=UqsdyN4B c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=CL0f2THRiyNhb4T0xRgA:9 a=QEXdDO2ut3YA:10 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.10.247; envelope-from=mattiase@acm.org; helo=mail56c50.megamailservers.eu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/28 05:59:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256582 Archived-At: 28 sep. 2020 kl. 11.42 skrev Robert Pluim : > Mattias> @defun string-replace fromstring tostring instring > Mattias> -This function copies @var{instring} and replaces any = occurrences of > Mattias> -@var{fromstring} with @var{tostring}. > Mattias> +This function returns a string equal to @var{instring} = where any > Mattias> +occurrences of @var{fromstring} have been replaced with > Mattias> +@var{tostring}. It may return one of its arguments. > Mattias> +Case is significant, and text properties are ignored. > Mattias> @end defun >=20 > 'equal'? Really? And it=CA=BCs kind of passive-voicey. Thank you for scrutinising my changes! For technical documentation, a declarative or functional style is often = appropriate than a procedural one. We would prefer defining (+ A B) as = the sum of A and B instead of saying that it takes A, then adds B, and = finally returns the result. > How about: >=20 > This function replaces any occurences of @var{fromstring} with > @var{tostring} in @var{instring} and returns the result. That is probably fine. I wanted there to be no reason to misread it as a = mutation of INSTRING, but the risk is probably minimal. I'll amend the = text. Thanks again!