diff options
| author | Richard M. Stallman | 1996-04-26 19:15:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-04-26 19:15:39 +0000 |
| commit | 917baba010d08236570f1d25bd009d0442a33fce (patch) | |
| tree | 4bdfa7b6caed32d4b75ba9afbd6daacf4207c2a7 | |
| parent | 6d07821119242f8b5b49e2c7028d1334f479edaa (diff) | |
| download | emacs-917baba010d08236570f1d25bd009d0442a33fce.tar.gz emacs-917baba010d08236570f1d25bd009d0442a33fce.zip | |
(mouse-drag-region): Leave region highlighted until the next input event.
| -rw-r--r-- | lisp/mouse.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index a5870734764..6a3bf6a2ae7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -560,7 +560,7 @@ release the mouse button. Otherwise, it does not." | |||
| 560 | ;; Run the binding of the terminating up-event, if possible. | 560 | ;; Run the binding of the terminating up-event, if possible. |
| 561 | ;; In the case of a multiple click, it gives the wrong results, | 561 | ;; In the case of a multiple click, it gives the wrong results, |
| 562 | ;; because it would fail to set up a region. | 562 | ;; because it would fail to set up a region. |
| 563 | (if (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun)) | 563 | (if nil ;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun)) |
| 564 | ;; In this case, we can just let the up-event execute normally. | 564 | ;; In this case, we can just let the up-event execute normally. |
| 565 | (let ((end (event-end event))) | 565 | (let ((end (event-end event))) |
| 566 | ;; Set the position in the event before we replay it, | 566 | ;; Set the position in the event before we replay it, |
| @@ -575,11 +575,15 @@ release the mouse button. Otherwise, it does not." | |||
| 575 | (if (not (= (overlay-start mouse-drag-overlay) | 575 | (if (not (= (overlay-start mouse-drag-overlay) |
| 576 | (overlay-end mouse-drag-overlay))) | 576 | (overlay-end mouse-drag-overlay))) |
| 577 | (let (last-command this-command) | 577 | (let (last-command this-command) |
| 578 | (let ((inhibit-quit t)) | ||
| 579 | (setq unread-command-events | ||
| 580 | (cons (read-event) unread-command-events)) | ||
| 581 | (setq quit-flag nil)) | ||
| 578 | (push-mark (overlay-start mouse-drag-overlay) t t) | 582 | (push-mark (overlay-start mouse-drag-overlay) t t) |
| 579 | (goto-char (overlay-end mouse-drag-overlay)) | 583 | (goto-char (overlay-end mouse-drag-overlay)) |
| 580 | (delete-overlay mouse-drag-overlay) | ||
| 581 | (copy-region-as-kill (point) (mark t)) | 584 | (copy-region-as-kill (point) (mark t)) |
| 582 | (mouse-set-region-1)) | 585 | (mouse-set-region-1) |
| 586 | (delete-overlay mouse-drag-overlay)) | ||
| 583 | (goto-char (overlay-end mouse-drag-overlay)) | 587 | (goto-char (overlay-end mouse-drag-overlay)) |
| 584 | (setq this-command 'mouse-set-point) | 588 | (setq this-command 'mouse-set-point) |
| 585 | (delete-overlay mouse-drag-overlay)))) | 589 | (delete-overlay mouse-drag-overlay)))) |