emacs-devel
[Top][All Lists]
Advanced

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

Re: [nongnu] elpa/xah-fly-keys 9637e144a0: - xah-copy-rectangle-to-kill-


From: Stefan Monnier
Subject: Re: [nongnu] elpa/xah-fly-keys 9637e144a0: - xah-copy-rectangle-to-kill-ring removed. use copy-rectangle-to-register.
Date: Thu, 02 Nov 2023 22:33:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> -  (interactive
> -   (if (region-active-p)
> -       (list (region-beginning) (region-end))
> -     (list (line-beginning-position) (line-end-position))))
> +  (interactive)
> +  (let (xp1 xp2)
> +    (if (and Begin End)
> +        (setq xp1 Begin xp2 End)
> +      (if (region-active-p)
> +          (setq xp1 (region-beginning) xp2 (region-end))
> +        (setq xp1 (line-beginning-position) xp2 (line-end-position))))

Hmm... in my book the old version above is more correct and the new
version is confusing interactive and non-interactive uses.
I understand that this is motivated by "now can be repeated by
repeat-complex-command".

I think I see why `repeat-complex-command` would work better with the
new code (and I suspect this deserves a bug report because it should be
possible to keep the code in the interactive form while making it work
well with `repeat-complex-command`), but I wonder in which circumstance
it would make sense to repeat `xah-unescape-quotes`?


        Stefan




reply via email to

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