bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45607: 27.1; compiled replace-string breaks repeat-complex-command


From: Lars Ingebrigtsen
Subject: bug#45607: 27.1; compiled replace-string breaks repeat-complex-command
Date: Wed, 06 Jul 2022 13:35:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Juri Linkov <juri@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]