[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: delete-selection-mode as default
From: |
Drew Adams |
Subject: |
RE: delete-selection-mode as default |
Date: |
Sun, 9 Sep 2018 07:48:05 -0700 (PDT) |
> > > How come it wasn't distinguished between the concept of a region being
> > > active and the visual aid of marking a region?
>
> > Separating these two concepts could be useful, but Emacs would then
> > need some other way of showing the user that a region is active, like
> > a mode line indicator.
>
> We could have another minor mode to control whether Backspace deletes
> an active region. That would solve the problem for me. We would still
> have the issue of what the default should be.
1. The behavior you object to here does not come from `d-s-m'.
(I guess you realize that, since you see the behavior and you don't
turn on `d-s-m'.) It comes from option `delete-active-region':
----8<------
delete-active-region is a variable defined in `simple.el'.
Its value is t
Documentation:
Whether single-char deletion commands delete an active region.
This has an effect only if Transient Mark mode is enabled, and
affects `delete-forward-char' and `delete-backward-char', though
not `delete-char'.
If the value is the symbol `kill', the active region is killed
instead of deleted.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 24.1 of Emacs.
----8<------
So you don't need another mode, to get what you want; just
customize that option.
2. Wrt `d-s-m', you can easily configure `d-s-m' to do what you want
for any given command. For example, if you were seeing the
behavior that you dislike here because `d-s-m' was turned on (and
not because of `delete-active-region') then you could just tell
`d-s-m' not to do anything for the command that you have bound
to <backspace>.
All you need to do, to make `d-s-m' do nothing for a given
command, is to set the `delete-section' property on that
command's symbol to nil. E.g., if `d-s-m' was the culprit in the
behavior you object to here, and if <backspace> was bound to
`delete-backward-char', then you would just do this:
(put 'delete-backward-char 'delete-selection nil)
- RE: delete-selection-mode as default, (continued)
- Re: delete-selection-mode as default, Richard Stallman, 2018/09/08
- Re: delete-selection-mode as default, Elias Mårtenson, 2018/09/08
- Re: delete-selection-mode as default, Eli Zaretskii, 2018/09/08
- Re: delete-selection-mode as default, hw, 2018/09/08
- Re: delete-selection-mode as default, Charles A. Roelli, 2018/09/08
- RE: delete-selection-mode as default, Drew Adams, 2018/09/08
- Re: delete-selection-mode as default, Richard Stallman, 2018/09/09
- RE: delete-selection-mode as default,
Drew Adams <=
- Re: delete-selection-mode as default, hw, 2018/09/10
- Re: delete-selection-mode as default, Richard Stallman, 2018/09/11
- Re: delete-selection-mode as default, hw, 2018/09/10
- visual-region-mode? (was: delete-selection-mode as default), hw, 2018/09/10
- Re: visual-region-mode? (was: delete-selection-mode as default), Charles A. Roelli, 2018/09/10
- Re: visual-region-mode? (was: delete-selection-mode as default), Yuri Khan, 2018/09/11
- Re: visual-region-mode? (was: delete-selection-mode as default), Charles A. Roelli, 2018/09/11
- Re: visual-region-mode? (was: delete-selection-mode as default), Yuri Khan, 2018/09/12
- Re: visual-region-mode?, Andreas Schwab, 2018/09/12
- Re: visual-region-mode?, Yuri Khan, 2018/09/12