diff options
| author | Kim F. Storm | 2007-02-26 10:11:34 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2007-02-26 10:11:34 +0000 |
| commit | 760a2050ca3b597fddd830f9676e427d97ecf9ff (patch) | |
| tree | 7177e8c4bf1d879d4c7b3b1ce31288dbee3efe51 | |
| parent | 864129b6f7f2c2b1fc81964796ced9915e570a7f (diff) | |
| download | emacs-760a2050ca3b597fddd830f9676e427d97ecf9ff.tar.gz emacs-760a2050ca3b597fddd830f9676e427d97ecf9ff.zip | |
(mouse-show-mark): Run hooks and perform command
remapping for mouse-region-delete-keys.
| -rw-r--r-- | lisp/mouse.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index dae098ec117..ef0784d8973 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1276,7 +1276,17 @@ If MODE is 2 then do the same for lines." | |||
| 1276 | (unless ignore | 1276 | (unless ignore |
| 1277 | ;; For certain special keys, delete the region. | 1277 | ;; For certain special keys, delete the region. |
| 1278 | (if (member key mouse-region-delete-keys) | 1278 | (if (member key mouse-region-delete-keys) |
| 1279 | (delete-region (mark t) (point)) | 1279 | (progn |
| 1280 | ;; Since notionally this is a separate command, | ||
| 1281 | ;; run all the hooks that would be run if it were | ||
| 1282 | ;; executed separately. | ||
| 1283 | (run-hooks 'post-command-hook) | ||
| 1284 | (setq last-command this-command) | ||
| 1285 | (setq this-original-command 'delete-region) | ||
| 1286 | (setq this-command (or (command-remapping this-original-command) | ||
| 1287 | this-original-command)) | ||
| 1288 | (run-hooks 'pre-command-hook) | ||
| 1289 | (call-interactively this-command)) | ||
| 1280 | ;; Otherwise, unread the key so it gets executed normally. | 1290 | ;; Otherwise, unread the key so it gets executed normally. |
| 1281 | (setq unread-command-events | 1291 | (setq unread-command-events |
| 1282 | (nconc events unread-command-events)))) | 1292 | (nconc events unread-command-events)))) |