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: Juri Linkov
Subject: bug#45607: 27.1; compiled replace-string breaks repeat-complex-command
Date: Fri, 12 Aug 2022 20:39:32 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> 2392:      (if (use-region-p) (region-beginning))
>> 2393:      (if (use-region-p) (region-end))
>
> That's fewer than I'd have guessed -- but I guess that quite a few
> commands stash the logic down into the function body instead of putting
> it into the `interactive' spec.  Commands like `duplicate-dwim', for
> instance, could be pretty easily fixed in that way, for instance.

OTOH, `duplicate-dwim' is optimized to call `use-region-p' only once:

  (cond
   ((use-region-p)
    (let* ((beg (region-beginning))
           (end (region-end))





reply via email to

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