summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-06-10 01:34:51 +0000
committerJim Blandy <jimb@redhat.com>1992-06-10 01:34:51 +0000
commit87ef29fd4c779b40f56cca5a5bb208c8fd79680d (patch)
tree3cefcf252375adeef383f6a908fc9cc48b7dced6 /lisp/mouse.el
parenta88b5c25733e18049f8b6f713a8f4229b83586b1 (diff)
downloademacs-87ef29fd4c779b40f56cca5a5bb208c8fd79680d.tar.gz
*** 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 @@
;;; mouse.el --- window system-independent mouse support.
-
-;;; Copyright (C) 1988 Free Software Foundation, Inc.
+;;; Copyright (C) 1988, 1992 Free Software Foundation, Inc.
;;; This file is part of GNU Emacs.
;;; GNU Emacs is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
+;;; the Free Software Foundation; either version 2, or (at your option)
;;; any later version.
;;; 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]."
(mouse-set-mark click)
(kill-region))
-(defun mouse-kill-ring-save
+(defun mouse-yank-at-click (click arg)
+ "Insert the last stretch of killed text at the position clicked on.
+Prefix arguments are interpreted as with \\[yank]."
+ (interactive "K\nP")
+ (mouse-set-point click)
+ (yank arg))
+
+(defun mouse-kill-ring-save (click)
"Copy the region between point and the mouse click in the kill ring.
This does not delete the region; it acts like \\[kill-ring-save]."
(interactive "K")
(mouse-set-mark click)
- (kill-ring-save))
+ (call-interactively 'kill-ring-save))
@@ -451,8 +457,10 @@ This does not delete the region; it acts like \\[kill-ring-save]."
;;; Bindings for mouse commands.
(global-set-key [mouse-1] 'mouse-set-point)
+(global-set-key [mouse-2] 'mouse-yank-at-click)
+(global-set-key [mouse-3] 'mouse-kill-ring-save)
+
(global-set-key [S-mouse-1] 'mouse-set-mark)
-(global-set-key [mouse-3] 'mouse-delete-other-windows)
(provide 'mouse)