aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman2007-12-25 20:09:05 +0000
committerRichard M. Stallman2007-12-25 20:09:05 +0000
commit63571b5a84eaec1b14768d284f4613502810a1d7 (patch)
tree9bd29456143c5784d38117c4590ada4fa05dfd5f /lisp
parent98b2fff491674a78037fdf8a3239c286908d8627 (diff)
downloademacs-63571b5a84eaec1b14768d284f4613502810a1d7.tar.gz
emacs-63571b5a84eaec1b14768d284f4613502810a1d7.zip
(mouse-yank-primary): New function (almost same as mouse-yank-secondary).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/mouse.el14
2 files changed, 27 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cca6ee0b296..27a302d7d01 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12007-12-25 Richard Stallman <rms@gnu.org>
2
3 * simple.el (select-active-regions): New option.
4 (set-mark): Obey it.
5
62007-12-25 David Golden <david.delaharpe.golden@gmail.com> (tiny change)
7
8 * term/x-win.el (x-select-enable-primary): New option.
9 (x-select-text, x-cut-buffer-or-selection-value): Obey it.
10
11 * mouse.el (mouse-yank-primary): New function (almost same
12 as mouse-yank-secondary).
13
12007-12-25 Dan Nicolaescu <dann@ics.uci.edu> 142007-12-25 Dan Nicolaescu <dann@ics.uci.edu>
2 15
3 * calculator.el: 16 * calculator.el:
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 39882ca33c0..8802aa98317 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1358,6 +1358,20 @@ regardless of where you click."
1358 (setq mouse-selection-click-count 0) 1358 (setq mouse-selection-click-count 0)
1359 (yank arg)) 1359 (yank arg))
1360 1360
1361(defun mouse-yank-primary (click)
1362 "Insert the primary selection at the position clicked on.
1363Move point to the end of the inserted text.
1364If `mouse-yank-at-point' is non-nil, insert at point
1365regardless of where you click."
1366 (interactive "e")
1367 ;; Give temporary modes such as isearch a chance to turn off.
1368 (run-hooks 'mouse-leave-buffer-hook)
1369 (or mouse-yank-at-point (mouse-set-point click))
1370 (let ((primary (x-get-selection 'PRIMARY)))
1371 (if primary
1372 (insert (x-get-selection 'PRIMARY))
1373 (error "No primary selection"))))
1374
1361(defun mouse-kill-ring-save (click) 1375(defun mouse-kill-ring-save (click)
1362 "Copy the region between point and the mouse click in the kill ring. 1376 "Copy the region between point and the mouse click in the kill ring.
1363This does not delete the region; it acts like \\[kill-ring-save]." 1377This does not delete the region; it acts like \\[kill-ring-save]."