aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorJim Blandy1992-06-10 01:34:51 +0000
committerJim Blandy1992-06-10 01:34:51 +0000
commit87ef29fd4c779b40f56cca5a5bb208c8fd79680d (patch)
tree3cefcf252375adeef383f6a908fc9cc48b7dced6 /lisp/mouse.el
parenta88b5c25733e18049f8b6f713a8f4229b83586b1 (diff)
downloademacs-87ef29fd4c779b40f56cca5a5bb208c8fd79680d.tar.gz
emacs-87ef29fd4c779b40f56cca5a5bb208c8fd79680d.zip
*** empty log message ***
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el20
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 94d0e4ba5f1..b953585ecf9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1,12 +1,11 @@
1;;; mouse.el --- window system-independent mouse support. 1;;; mouse.el --- window system-independent mouse support.
2 2;;; Copyright (C) 1988, 1992 Free Software Foundation, Inc.
3;;; Copyright (C) 1988 Free Software Foundation, Inc.
4 3
5;;; This file is part of GNU Emacs. 4;;; This file is part of GNU Emacs.
6 5
7;;; GNU Emacs is free software; you can redistribute it and/or modify 6;;; GNU Emacs is free software; you can redistribute it and/or modify
8;;; it under the terms of the GNU General Public License as published by 7;;; it under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 1, or (at your option) 8;;; the Free Software Foundation; either version 2, or (at your option)
10;;; any later version. 9;;; any later version.
11 10
12;;; GNU Emacs is distributed in the hope that it will be useful, 11;;; GNU Emacs is distributed in the hope that it will be useful,
@@ -81,12 +80,19 @@ The text is saved in the kill ring, as with \\[kill-region]."
81 (mouse-set-mark click) 80 (mouse-set-mark click)
82 (kill-region)) 81 (kill-region))
83 82
84(defun mouse-kill-ring-save 83(defun mouse-yank-at-click (click arg)
84 "Insert the last stretch of killed text at the position clicked on.
85Prefix arguments are interpreted as with \\[yank]."
86 (interactive "K\nP")
87 (mouse-set-point click)
88 (yank arg))
89
90(defun mouse-kill-ring-save (click)
85 "Copy the region between point and the mouse click in the kill ring. 91 "Copy the region between point and the mouse click in the kill ring.
86This does not delete the region; it acts like \\[kill-ring-save]." 92This does not delete the region; it acts like \\[kill-ring-save]."
87 (interactive "K") 93 (interactive "K")
88 (mouse-set-mark click) 94 (mouse-set-mark click)
89 (kill-ring-save)) 95 (call-interactively 'kill-ring-save))
90 96
91 97
92 98
@@ -451,8 +457,10 @@ This does not delete the region; it acts like \\[kill-ring-save]."
451;;; Bindings for mouse commands. 457;;; Bindings for mouse commands.
452 458
453(global-set-key [mouse-1] 'mouse-set-point) 459(global-set-key [mouse-1] 'mouse-set-point)
460(global-set-key [mouse-2] 'mouse-yank-at-click)
461(global-set-key [mouse-3] 'mouse-kill-ring-save)
462
454(global-set-key [S-mouse-1] 'mouse-set-mark) 463(global-set-key [S-mouse-1] 'mouse-set-mark)
455(global-set-key [mouse-3] 'mouse-delete-other-windows)
456 464
457(provide 'mouse) 465(provide 'mouse)
458 466