[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Change default behavior of some commands that act on region?
From: |
Drew Adams |
Subject: |
Change default behavior of some commands that act on region? |
Date: |
Fri, 21 May 2021 20:58:48 +0000 |
This is a follow-up to this post to help-gnu-emacs@gnu.org:
https://lists.gnu.org/archive/html/help-gnu-emacs/2021-05/msg00762.html
I hesitate to suggest changing default behavior, but
maybe this is worth considering.
There are some commands, such as `downcase-region',
that act on the region regardless of whether it's
active. Because `transient-mark-mode' has been on by
default for quite a while now, and because there are
few such commands, users can wonder what's going on.
Or worse, they can sometimes not notice that anything
happened until much later, and then not understand
what caused the change (whatever it is).
Would it be too shocking to change the default
behavior of some such commands, so that they would
do something "safer"?
For example, when invoked interactively, if the
region is not active, and if `transient-mark-mode'
is turned on, such commands could do something like:
* be a no-op
* raise an error
* prompt for confirmation first
Those conditions are important: There'd be no change
when invoked from code, or when `transient-mark-mode'
is off. Anyone who leaves that mode off would see no
change in behavior, and the same for existing Lisp code.
- Change default behavior of some commands that act on region?,
Drew Adams <=
- Re: Change default behavior of some commands that act on region?, Eli Zaretskii, 2021/05/22
- Re: Change default behavior of some commands that act on region?, Clément Pit-Claudel, 2021/05/22
- Re: Change default behavior of some commands that act on region?, Eli Zaretskii, 2021/05/22
- Re: Change default behavior of some commands that act on region?, Clément Pit-Claudel, 2021/05/22
- Re: Change default behavior of some commands that act on region?, Eli Zaretskii, 2021/05/22
- RE: [External] : Re: Change default behavior of some commands that act on region?, Drew Adams, 2021/05/22
RE: [External] : Re: Change default behavior of some commands that act on region?, Drew Adams, 2021/05/22
Re: Change default behavior of some commands that act on region?, Stefan Monnier, 2021/05/22