]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/mouse.el (mouse-yank-primary, mouse-yank-secondary):
authorSam Steingold <sds@gnu.org>
Mon, 26 Jul 2010 19:05:47 +0000 (15:05 -0400)
committerSam Steingold <sds@gnu.org>
Mon, 26 Jul 2010 19:05:47 +0000 (15:05 -0400)
Do not call `x-get-selection' the second time, reuse the value.

lisp/ChangeLog
lisp/mouse.el

index 9d6f0ed0d98832cd23938461864c85420f95e0f1..ff65a6398a87210b4370b6232cd1bc1e8ec9abba 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-26  Sam Steingold  <sds@gnu.org>
+
+       * 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  <ueno@unixuser.org>
 
        * epa-mail.el (epa-mail-mode-map): Add alternative key bindings
index 87cca4044b89546ca807dd0cc1a2d1b8dbe9e27c..7ba7b031e1ebc0c1272e7e459746d8203109d11b 100644 (file)
@@ -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 ()