[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG REPORT: "delsel.el"
From: |
Le Wang |
Subject: |
Re: BUG REPORT: "delsel.el" |
Date: |
Mon, 03 Mar 2003 18:08:55 -0500 |
User-agent: |
KNode/0.7.1 |
Richard Stallman wrote:
> + (unless transient-mark-mode
> + (setq mark-active nil)
> + (run-hooks 'deactivate-mark-hook))
>
> To quote the doc string of delete-selection-mode:
>
> When Delete Selection mode is enabled, Transient Mark mode is also
> enabled and typed text replaces the selection if the selection is
> active.
>
> So putting (unless transient-mark-mode ...) around that code in
> delete-active-region is equivalent to deleting it. That can't be
> right.
It's not right. Quoting the doc string from transient-mark-mode:
,----[ C-h f transient-mark-mode RET ]
|
| [...]
|
| In Transient Mark mode, when the mark is active, the region is highlighted.
| Changing the buffer "deactivates" the mark.
|
| [...]
|
`----
So `delete-active-region' by virtue of `transient-mark-mode' already
deactivates the region. And as I mentioned in another post in this thread,
this patch is appropriate:
*** /usr/local/share/emacs/21.3.50/lisp/delsel.el Mon Nov 19 01:21:11
2001
--- /tmp/buffer-content-278329Vo Sun Mar 2 17:28:13 2003
***************
*** 75,82 ****
(if killp
(kill-region (point) (mark))
(delete-region (point) (mark)))
- (setq mark-active nil)
- (run-hooks 'deactivate-mark-hook)
t)
(defun delete-selection-pre-hook ()
--- 75,80 ----
Diff finished at Sun Mar 2 17:28:13
--
Le