[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (insert ...) won't respect delete-selection-mode
From: |
Xah |
Subject: |
Re: (insert ...) won't respect delete-selection-mode |
Date: |
Thu, 9 Oct 2008 14:27:36 -0700 (PDT) |
User-agent: |
G2/1.0 |
In this thread:
«(insert ...) won't respect delete-selection-mode Options»
«(put 'insert-date 'delete-selection t)»
«The command also needs to be activated with keyboard. M-x does not do
it.»
«Doesn't this look like a delicate problem? Maybe a bug?»
I reported this to FSF.
http://groups.google.com/group/gnu.emacs.bug/browse_frm/thread/ba8ab4a5223591b7
Richard M Stallman wrote:
«It's intentional. This feature implements expectations that users
have for single-character editing operations in other editors, where
those commands don't have names and there's nothing like M-x. So
there's no reason why M-x should delete the region. It is better for
M-x just to call the function.»
Xah Lee wrote:
«Interesting point.
For elisp programers who wish to write extentions where the command's
behaviors change depending on whether user has delete-selection-mode
on, what should they do? Check for mark-active and delete-selection-
mode before any call to the insert function?
also, the current behavior seems to introduce a complexity, where
command behaves differently depending on whether it is invoked by a
keybinding or by M-x.
»
Richard wrote:
«If you really want to make behavior depend on those variables, you
need to check them. Whether you check them before or after calling
`insert' is up to you.
But that seems like a strange thing to do.»
Doh! I failed humanity.
Xah
∑ http://xahlee.org/
☄
- (insert ...) won't respect delete-selection-mode, Xah, 2008/10/07
- RE: (insert ...) won't respect delete-selection-mode, Drew Adams, 2008/10/07
- Message not available
- Re: (insert ...) won't respect delete-selection-mode, Chetan, 2008/10/07
- Re: (insert ...) won't respect delete-selection-mode, Xah, 2008/10/08
- Re: (insert ...) won't respect delete-selection-mode, Andreas Politz, 2008/10/08
- Re: (insert ...) won't respect delete-selection-mode, Xah, 2008/10/08
- Re: (insert ...) won't respect delete-selection-mode, Andreas Politz, 2008/10/08
- Re: (insert ...) won't respect delete-selection-mode, Lennart Borgman (gmail), 2008/10/08
- Message not available
- Re: (insert ...) won't respect delete-selection-mode,
Xah <=