[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pre-command-hook not run for DEL
From: |
Kim F. Storm |
Subject: |
Re: pre-command-hook not run for DEL |
Date: |
Mon, 26 Feb 2007 11:08:51 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> Does this patch do the right thing?
Not entirely.
Here is a better patch:
*** mouse.el 03 Feb 2007 00:29:40 +0100 1.311
--- mouse.el 26 Feb 2007 11:07:44 +0100
***************
*** 1276,1282 ****
(unless ignore
;; For certain special keys, delete the region.
(if (member key mouse-region-delete-keys)
! (delete-region (mark t) (point))
;; Otherwise, unread the key so it gets executed normally.
(setq unread-command-events
(nconc events unread-command-events))))
--- 1276,1292 ----
(unless ignore
;; For certain special keys, delete the region.
(if (member key mouse-region-delete-keys)
! (progn
! ;; Since notionally this is a separate command,
! ;; run all the hooks that would be run if it were
! ;; executed separately.
! (run-hooks 'post-command-hook)
! (setq last-command this-command)
! (setq this-original-command 'delete-region)
! (setq this-command (or (command-remapping this-original-command)
! this-original-command))
! (run-hooks 'pre-command-hook)
! (call-interactively this-command))
;; Otherwise, unread the key so it gets executed normally.
(setq unread-command-events
(nconc events unread-command-events))))
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: pre-command-hook not run for DEL, (continued)
- Re: pre-command-hook not run for DEL, davidswelt, 2007/02/24
- Re: pre-command-hook not run for DEL, Richard Stallman, 2007/02/25
- Re: pre-command-hook not run for DEL, Kim F. Storm, 2007/02/25
- Re: pre-command-hook not run for DEL, Stefan Monnier, 2007/02/25
- Re: pre-command-hook not run for DEL, Kim F. Storm, 2007/02/26
- Re: pre-command-hook not run for DEL, Stefan Monnier, 2007/02/26
- Re: pre-command-hook not run for DEL, Richard Stallman, 2007/02/26
- Re: pre-command-hook not run for DEL, Richard Stallman, 2007/02/26
- Re: pre-command-hook not run for DEL, Kim F. Storm, 2007/02/26
- Re: pre-command-hook not run for DEL, Richard Stallman, 2007/02/25
- Re: pre-command-hook not run for DEL,
Kim F. Storm <=
- Re: pre-command-hook not run for DEL, Johan Bockgård, 2007/02/26
- Re: pre-command-hook not run for DEL, Stefan Monnier, 2007/02/26
- Re: pre-command-hook not run for DEL, David Reitter, 2007/02/26
- Re: pre-command-hook not run for DEL, Kim F. Storm, 2007/02/26
- Re: pre-command-hook not run for DEL, Richard Stallman, 2007/02/27