Mercurial > emacs
comparison lisp/mouse.el @ 8534:a446d13c46ea
(mouse-set-mark): Select the window before saving point.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 13 Aug 1994 20:29:54 +0000 |
parents | 7802e26b3bfd |
children | 77933f36ddc2 |
comparison
equal
deleted
inserted
replaced
8533:a0af63b5bc45 | 8534:a446d13c46ea |
---|---|
456 (defun mouse-set-mark (click) | 456 (defun mouse-set-mark (click) |
457 "Set mark at the position clicked on with the mouse. | 457 "Set mark at the position clicked on with the mouse. |
458 Display cursor at that position for a second. | 458 Display cursor at that position for a second. |
459 This must be bound to a mouse click." | 459 This must be bound to a mouse click." |
460 (interactive "e") | 460 (interactive "e") |
461 (mouse-minibuffer-check click) | |
462 (select-window (posn-window (event-start click))) | |
463 ;; We don't use save-excursion because that preserves the mark too. | |
461 (let ((point-save (point))) | 464 (let ((point-save (point))) |
462 (unwind-protect | 465 (unwind-protect |
463 (progn (mouse-set-point click) | 466 (progn (mouse-set-point click) |
464 (push-mark nil t t) | 467 (push-mark nil t t) |
465 (or transient-mark-mode | 468 (or transient-mark-mode |