emacs-devel
[Top][All Lists]
Advanced

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

Re: [WIP PATCH] Adding more keybindings to rectangle-mark-mode-map


From: Jim Porter
Subject: Re: [WIP PATCH] Adding more keybindings to rectangle-mark-mode-map
Date: Sun, 2 May 2021 08:48:21 -0700

On Sat, May 1, 2021 at 11:58 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Jim Porter <jporterbugs@gmail.com>
> > Perhaps Edit -> Clear should be bound to `backward-delete-char-untabify'?
>
> ??? The latter deletes a single character, whereas delete-region
> deletes many characters.  How can we replace delete-region by
> backward-delete-char-untabify?

Based on what Stefan said (see below), if the region (regular or
rectangular) is active, `backward-delete-char-untabify' deletes the
*region* instead of a single character. I interpreted that to mean
that, if Edit -> Clear is only enabled when there's an active
region/rect, `backward-delete-char-untabify' is equivalent to a
hypothetical `delete-rect-or-region'. Maybe that's not so simple, and
there's a variable I'm not aware of that can alter its behavior to not
delete the region (or some other problem). In any case, mapping Edit
-> Clear to a command that knows how to delete a rectangular region
might be helpful.

On Sat, May 1, 2021 at 10:20 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Oh, no, you're right: it's not done in `delete-region` (which is
> a fairly low-level function and hence not ideal to piggy-back such
> high-level UI functionality), but in `backward-delete-char-untabify`.
> Whether it kills or deletes (or just does the good old backspace)
> depends on `delete-active-region`.

- Jim



reply via email to

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