Mercurial > emacs
comparison lisp/mouse.el @ 1039:8ab465f7a7ff
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 29 Aug 1992 02:14:58 +0000 |
parents | 113281b361ec |
children | a7fc54083464 |
comparison
equal
deleted
inserted
replaced
1038:59fa7697bb14 | 1039:8ab465f7a7ff |
---|---|
61 (defun mouse-set-point (click) | 61 (defun mouse-set-point (click) |
62 "Move point to the position clicked on with the mouse. | 62 "Move point to the position clicked on with the mouse. |
63 This must be bound to a mouse click." | 63 This must be bound to a mouse click." |
64 (interactive "K") | 64 (interactive "K") |
65 (select-window (event-window click)) | 65 (select-window (event-window click)) |
66 (goto-char (event-point click))) | 66 (if (numberp (event-point click)) |
67 (goto-char (event-point click)))) | |
67 | 68 |
68 (defun mouse-set-mark (click) | 69 (defun mouse-set-mark (click) |
69 "Set mark at the position clicked on with the mouse. | 70 "Set mark at the position clicked on with the mouse. |
70 Display cursor at that position for a second. | 71 Display cursor at that position for a second. |
71 This must be bound to a mouse click." | 72 This must be bound to a mouse click." |
80 (defun mouse-kill (click) | 81 (defun mouse-kill (click) |
81 "Kill the region between point and the mouse click. | 82 "Kill the region between point and the mouse click. |
82 The text is saved in the kill ring, as with \\[kill-region]." | 83 The text is saved in the kill ring, as with \\[kill-region]." |
83 (interactive "K") | 84 (interactive "K") |
84 (let ((click-posn (event-point click))) | 85 (let ((click-posn (event-point click))) |
85 (kill-region (min (point) click-posn) | 86 (if (numberp click-posn) |
86 (max (point) click-posn)))) | 87 (kill-region (min (point) click-posn) |
88 (max (point) click-posn))))) | |
87 | 89 |
88 (defun mouse-yank-at-click (click arg) | 90 (defun mouse-yank-at-click (click arg) |
89 "Insert the last stretch of killed text at the position clicked on. | 91 "Insert the last stretch of killed text at the position clicked on. |
90 Prefix arguments are interpreted as with \\[yank]." | 92 Prefix arguments are interpreted as with \\[yank]." |
91 (interactive "K\nP") | 93 (interactive "K\nP") |