[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
kill-region
From: |
Luc Teirlinck |
Subject: |
kill-region |
Date: |
Wed, 21 May 2003 09:47:42 -0500 (CDT) |
kill-region sets this-command to 'kill-region even if the last command
was not a kill command *and* kill-region did not make a new entry on
the kill-ring (which happens if kill-region is called on an empty
region).
This can lead to strange consequences. Start out with some non-empty
kill ring. Go to the end of some buffer containing at least two lines.
Do M-2 k. Nothing got killed, since we are at the end of the buffer.
Now do M--2 k. (What we probably wanted to do, we just forgot the
"-".) Now C-y. The last two lines of the buffer got prepended to the
previous kill ring entry. Does this make sense? We could have
avoided the mess by doing a C-g after the erroneous M-2 k, but it
still seems very counter-intuitive.
Might it be better for kill-region to either not set this-command to
'kill-region if the last command was not already a kill command and
kill-region did not make a new entry on the kill ring, or,
alternatively, make kill-region add an empty string to the end of the
kill ring in the described situation, to which subsequent kill
commands could append or prepend?
Sincerely,
Luc.
- kill-region,
Luc Teirlinck <=