[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Delete Selection Mode bug
From: |
deja8501 |
Subject: |
Delete Selection Mode bug |
Date: |
Sun, 28 Jan 2001 13:43:18 GMT |
Hi,
When I use pc-selection-mode (which uses delete-selection-mode) for
marking and deleting text, I'd like to have the killed text in the kill
ring.
Therefore I changed the delete-selection property of delete-char from
`supersede' to `kill':
(put 'delete-char 'delete-selection 'kill)
This works fine, the killed text is in the kill ring. However, the
kill-ring also contains a superfluous empty item:
("" "<killed text>" ...)
The backtrace shows that kill-region is called twice. The first call is
the expected kill, the second is the superfluous one:
kill-region(5 1)
delete-active-region(t)
(cond ((eq type ...) (delete-active-region t)) ((eq type ...) (when
... ...) (delete-active-region)) ((eq type ...) (delete-active-region)
(setq this-command ...)) (type (delete-active-region)))
(let ((type ...)) (cond (... ...) (... ... ...) (... ... ...) (type
...)))
(progn (let (...) (cond ... ... ... ...)))
(if (and delete-selection-mode transient-mark-mode mark-active (not
buffer-read-only)) (progn (let ... ...)))
(when (and delete-selection-mode transient-mark-mode mark-active (not
buffer-read-only)) (let (...) (cond ... ... ... ...)))
delete-selection-pre-hook()
run-hooks(pre-command-hook)
kill-region(43 43)
call-interactively(kill-region)
I was unable to find out why the second kill-region via
call-interactively is invoked. Maybe you can.
It's Emacs 20.7.
regards,
Tom
Sent via Deja.com
http://www.deja.com/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Delete Selection Mode bug,
deja8501 <=