changeset 76876:e3994020ab84

(mouse-set-secondary): Update mouse-secondary-overlay.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 01 Apr 2007 17:45:20 +0000
parents 5ca7b06d3fd6
children f965ea8c5333
files lisp/mouse.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Sun Apr 01 17:45:00 2007 +0000
+++ b/lisp/mouse.el	Sun Apr 01 17:45:20 2007 +0000
@@ -1521,7 +1521,11 @@
     (with-current-buffer (window-buffer (posn-window posn))
       (if (numberp (posn-point posn))
 	  (setq beg (posn-point posn)))
-      (move-overlay mouse-secondary-overlay beg (posn-point end)))))
+      (move-overlay mouse-secondary-overlay beg (posn-point end))
+      (x-set-selection
+       'SECONDARY
+       (buffer-substring (overlay-start mouse-secondary-overlay)
+			 (overlay-end mouse-secondary-overlay))))))
 
 (defun mouse-drag-secondary (start-event)
   "Set the secondary selection to the text that the mouse is dragged over.