]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-set-secondary): Update mouse-secondary-overlay.
authorChong Yidong <cyd@stupidchicken.com>
Sun, 1 Apr 2007 17:45:20 +0000 (17:45 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 1 Apr 2007 17:45:20 +0000 (17:45 +0000)
lisp/mouse.el

index 8e9d931c15c67d7bf06050bae5b0e39fc9ed8c04..94d19d99a21e24125cde31753a5774ad41b45e11 100644 (file)
@@ -1521,7 +1521,11 @@ This must be bound to a mouse drag event."
     (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.