From aa2d4bd3438df0855c168c960e03d1f8ea25ae71 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Mon, 26 Jul 2010 15:05:47 -0400 Subject: [PATCH] * lisp/mouse.el (mouse-yank-primary, mouse-yank-secondary): Do not call `x-get-selection' the second time, reuse the value. --- lisp/ChangeLog | 5 +++++ lisp/mouse.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d6f0ed0d98..ff65a6398a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-07-26 Sam Steingold + + * mouse.el (mouse-yank-primary, mouse-yank-secondary): + Do not call `x-get-selection' the second time, reuse the value. + 2010-07-26 Daiki Ueno * epa-mail.el (epa-mail-mode-map): Add alternative key bindings diff --git a/lisp/mouse.el b/lisp/mouse.el index 87cca4044b8..7ba7b031e1e 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1282,7 +1282,7 @@ regardless of where you click." (or mouse-yank-at-point (mouse-set-point click)) (let ((primary (x-get-selection 'PRIMARY))) (if primary - (insert (x-get-selection 'PRIMARY)) + (insert primary) (error "No primary selection")))) (defun mouse-kill-ring-save (click) @@ -1577,7 +1577,7 @@ regardless of where you click." (or mouse-yank-at-point (mouse-set-point click)) (let ((secondary (x-get-selection 'SECONDARY))) (if secondary - (insert (x-get-selection 'SECONDARY)) + (insert secondary) (error "No secondary selection")))) (defun mouse-kill-secondary () -- 2.39.2