diff options
| author | Richard M. Stallman | 1996-05-06 00:43:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-05-06 00:43:26 +0000 |
| commit | f42be8fd1c37e241b0d24f071cf997c06e1d8996 (patch) | |
| tree | bb667b5be2d1354ca313cf77a5149a10a040e61f | |
| parent | fb859603163458157f107bae728cfefabff41c1a (diff) | |
| download | emacs-f42be8fd1c37e241b0d24f071cf997c06e1d8996.tar.gz emacs-f42be8fd1c37e241b0d24f071cf997c06e1d8996.zip | |
(mouse-drag-region): Set the region before reading a
character, so the selection exists while we wait.
| -rw-r--r-- | lisp/mouse.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 14fe1c77529..00a53d6c8fc 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -575,13 +575,13 @@ remains active. Otherwise, it remains until the next input event." | |||
| 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 | (push-mark (overlay-start mouse-drag-overlay) t t) | ||
| 579 | (goto-char (overlay-end mouse-drag-overlay)) | ||
| 580 | (copy-region-as-kill (point) (mark t)) | ||
| 578 | (let ((inhibit-quit t)) | 581 | (let ((inhibit-quit t)) |
| 579 | (setq unread-command-events | 582 | (setq unread-command-events |
| 580 | (cons (read-event) unread-command-events)) | 583 | (cons (read-event) unread-command-events)) |
| 581 | (setq quit-flag nil)) | 584 | (setq quit-flag nil)) |
| 582 | (push-mark (overlay-start mouse-drag-overlay) t t) | ||
| 583 | (goto-char (overlay-end mouse-drag-overlay)) | ||
| 584 | (copy-region-as-kill (point) (mark t)) | ||
| 585 | (mouse-set-region-1) | 585 | (mouse-set-region-1) |
| 586 | (delete-overlay mouse-drag-overlay)) | 586 | (delete-overlay mouse-drag-overlay)) |
| 587 | (goto-char (overlay-end mouse-drag-overlay)) | 587 | (goto-char (overlay-end mouse-drag-overlay)) |