From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45607: 27.1; compiled replace-string breaks repeat-complex-command Date: Thu, 09 Jun 2022 20:52:57 +0200 Message-ID: <87v8t9y8hi.fsf@gnus.org> References: <80o8i7676p.fsf@felesatra.moe> <87czfkir6n.fsf@gnus.org> <86r1402un1.fsf@mail.linkov.net> <87y1y79x82.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33133"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 45607@debbugs.gnu.org, Allen Li To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 21:07:10 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 1nzNUr-0008Ri-Sx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 21:07:09 +0200 Original-Received: from localhost ([::1]:46756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzNUq-0005KD-Hd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 15:07:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzNIA-0003gk-W1 for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:54:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzNIA-0000p1-Nm for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzNIA-0000Qz-Mp for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2022 18:54:02 +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.16548007881570 (code B ref 45607); Thu, 09 Jun 2022 18:54:02 +0000 Original-Received: (at 45607) by debbugs.gnu.org; 9 Jun 2022 18:53:08 +0000 Original-Received: from localhost ([127.0.0.1]:47750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzNHI-0000PF-KV for submit@debbugs.gnu.org; Thu, 09 Jun 2022 14:53:08 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzNHH-0000OV-4J for 45607@debbugs.gnu.org; Thu, 09 Jun 2022 14:53:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JD7/QA1g0tshMVj6ArhU0y0C/gjQXLBMvHKPiNQuYHk=; b=Qd+/xZ3gvII9t7j1BRbLw+lgFE 2OS0DFbA/aBYg2xXdCzb+gdo2yDeP446EAlpnAp1wvfIafQ9R8ApqJxY0B7kFGsinATH65gRptM1n 7MHbyiYd02OM4WKJVU5kLrtzcd/BfWaTRq6PsoHPLg0CWyOZy3tUAtsxQtKrg2eos774=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzNH7-0004Tj-K0; Thu, 09 Jun 2022 20:53:00 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVYWGHz8/IQEBSl qb1nb6T///90f4viAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YGBgEFM2WHBycAAAGiSURBVDjLxZPb YYMwDEUVmwGiigFcJwMg5AEIeP+ZqgehKWm/a77wsR73yobLtfIk6CvVfRVBUJBBkB3ojy9ABL76 AQeEOEYEEyBBzZHJAO1AFEgX8gDMzzqFCNiyTA/bHxd54BoRWtxSBMCRgWcHWvzTgDA+17S+AKR8 AJmPVKpuvDTf1MDFqt/QAWtyP30VpFR2oHkYWwDacC4WkR2EMl88eU+JzRIHIpu35PtgpyNiHBaO fTDn2gG8JUQ9zlrCf9VxYSL1RUigL7mtO1DVQsQKuMkkkufqZQFZ1FwxdYOsfRvm+tjBxsTaL1Mv CXKf68UBpBvbAJVZr7kllae5YTCDIsTAXc31SXwrJwnVtT7oAN/jLqsOg0Lgc0gRMT2BzVwF6uc1 6lRvJpcPS2i/IEu1mfKLVzvooe8H8FRDWHUCanoOq04g/QqoplQB3sFYygJ6R97Axx1WuzvvYEje 8LkrmnM8tXOExF2rbwLHeX+Zn+dUq/X6A/hDI31LsNmVfgEivAlOQ+8d7tD9IIhI633rTdYCHaCk oW26CfWP9a/gC9Piem1iKRDKAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA2LTA2VDAxOjA1OjUx KzAwOjAwOanalAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNi0wNlQwMTowNTo1MSswMDowMEj0 YigAAAAASUVORK5CYII= X-Now-Playing: Ultra =?UTF-8?Q?Nat=C3=A9's?= _How Long: Ultra Nate Best Remixes Volume 2_: "How Long (118th Street Instrumental)" In-Reply-To: <87y1y79x82.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 08 Jun 2022 14:05:33 +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:234153 Archived-At: Lars Ingebrigtsen writes: > could be something like > > (interactive-region-beginning) > (interactive-region-end) > > and whatever updates command-history would reify those as is instead of > their return values? Sometimes it's helpful to actually look at the code. All this magic comes from: /* If the list of args INPUT was produced with an explicit call to `list', look for elements that were computed with (region-beginning) or (region-end), and put those expressions into VALUES instead of the present values. This function doesn't return a value because it modifies elements of VALUES to do its job. */ static void fix_command (Lisp_Object input, Lisp_Object values) { /* FIXME: Instead of this ugly hack, we should provide a way for an interactive spec to return an expression/function that will re-build the args without user intervention. */ if (CONSP (input)) And what this does is to try to hack its way through the lisp code in an interactive spec like /* Skip through certain special forms. */ while (EQ (car, Qlet) || EQ (car, Qletx) || EQ (car, Qsave_excursion) || EQ (car, Qprogn)) looking for `region-beginning' and friends. But we now byte-compile the interactive specs, so all this fails spectacularly. So we need a brand new way to specify which options are `region-beginning' etc. Perhaps with a declare form? (That translates into symbol properties, I guess.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no