GNU bug report logs - #45607
27.1; compiled replace-string breaks repeat-complex-command

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Sat, 2 Jan 2021 09:08:02 UTC

Severity: normal

Tags: moreinfo

Found in version 27.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #49 received at 45607 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 45607 <at> debbugs.gnu.org,
 Allen Li <darkfeline <at> felesatra.moe>
Subject: Re: bug#45607: 27.1; compiled replace-string breaks
 repeat-complex-command
Date: Wed, 06 Jul 2022 13:35:28 +0200
Juri Linkov <juri <at> linkov.net> writes:

>>> (defun replace-string (from-string to-string &optional delimited start end backward region-noncontiguous-p)
>>> ...
>>>   (declare (arg start (if (use-region-p) (region-beginning)))
>>>            (arg end (if (use-region-p) (region-end))))

[...]

> Indeed, some users might want to have numbers for START and END values
> to repeat the command exactly on the same previous region, but other users
> might want to repeat the command on a newly selected region with
> (region-beginning)/(region-end) in the command history.

Have a look at fix_command -- it tries to parse code in an interactive
spec to find instances of

  preserved_fns = pure_list (intern_c_string ("region-beginning"),
			     intern_c_string ("region-end"),
			     intern_c_string ("point"),
			     intern_c_string ("mark"));

in the code.  (Which doesn't work now, of course, since the spec is
byte-compiled.)  My `declare' suggestion would just make this work
again, and fix a regression.  That is, this isn't new functionality.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.