From 3e4f866be36315a0f498c61b32ee2d299a7e0567 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 1 Apr 2007 17:45:20 +0000 Subject: [PATCH] (mouse-set-secondary): Update mouse-secondary-overlay. --- lisp/mouse.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 8e9d931c15c..94d19d99a21 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -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. -- 2.39.5