From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45607: 27.1; compiled replace-string breaks repeat-complex-command Date: Tue, 09 Aug 2022 22:30:54 +0300 Organization: LINKOV.NET Message-ID: <86tu6lnrip.fsf@mail.linkov.net> References: <80o8i7676p.fsf@felesatra.moe> <87czfkir6n.fsf@gnus.org> <86r1402un1.fsf@mail.linkov.net> <87y1y79x82.fsf@gnus.org> <87v8t9y8hi.fsf@gnus.org> <87r13xy8c3.fsf@gnus.org> <871quzaagc.fsf@web.de> <861quywusu.fsf@mail.linkov.net> <8735felbi7.fsf@gnus.org> <864jzursq8.fsf@mail.linkov.net> <87zghlgxk4.fsf@gnus.org> <87bksuzvs5.fsf@gnus.org> <86iln264vg.fsf@mail.linkov.net> <871qtpzck5.fsf@gnus.org> <868rnxqmy3.fsf@mail.linkov.net> <87r11ptek3.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4292"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Michael Heerdegen , 45607@debbugs.gnu.org, Allen Li To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 09 21:36:28 2022 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 1oLV1g-0000x4-GQ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 21:36:28 +0200 Original-Received: from localhost ([::1]:48138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLV1f-00004v-6d for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 15:36:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLV0I-00085d-2R for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 15:35:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLV0H-0000Yi-Q3 for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 15:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLV0H-0000UY-MK for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 15:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Aug 2022 19:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45607 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45607-submit@debbugs.gnu.org id=B45607.16600736601833 (code B ref 45607); Tue, 09 Aug 2022 19:35:01 +0000 Original-Received: (at 45607) by debbugs.gnu.org; 9 Aug 2022 19:34:20 +0000 Original-Received: from localhost ([127.0.0.1]:45114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLUzc-0000TU-BF for submit@debbugs.gnu.org; Tue, 09 Aug 2022 15:34:20 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLUzX-0000TE-Lg for 45607@debbugs.gnu.org; Tue, 09 Aug 2022 15:34:18 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 74DA8E0007; Tue, 9 Aug 2022 19:34:07 +0000 (UTC) In-Reply-To: <87r11ptek3.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 09 Aug 2022 21:14:20 +0200") 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:239219 Archived-At: >> (replace-string "a" "b" nil (if (use-region-p) (region-beginning)) >> (if (use-region-p) (region-end))) >> -> >> (replace-string "a" "b" nil (use-region-beginning) (use-region-end)) > > OK, so I've now done this. So somebody™ should go through the code base > and adjust the code and add the new `declare' forms. 😀 Interesting, there are not too many uses of this pattern, and most of them are related to replacement commands. Ok, I could replace them with adding interactive-args. lisp/isearch.el 2392: (if (use-region-p) (region-beginning)) 2393: (if (use-region-p) (region-end)) lisp/replace.el 464: (if (use-region-p) (region-beginning)) 465: (if (use-region-p) (region-end)) 558: (if (use-region-p) (region-beginning)) 559: (if (use-region-p) (region-end)) 606: (if (use-region-p) (region-beginning)) 607: (if (use-region-p) (region-end)) 761: (if (use-region-p) (region-beginning)) 762: (if (use-region-p) (region-end)) lisp/textmodes/paragraphs.el 518: (if (use-region-p) (region-beginning)) 519: (if (use-region-p) (region-end)))) lisp/vc/log-view.el 581: (list (if (use-region-p) (region-beginning) (point)) 582: (if (use-region-p) (region-end) (point)))) 596: (list (if (use-region-p) (region-beginning) (point)) 597: (if (use-region-p) (region-end) (point))))