]> code.delx.au - gnu-emacs/commitdiff
* term/x-win.el (x-clipboard-yank): Don't exit on error from
authorJan Djärv <jan.h.d@swipnet.se>
Mon, 3 May 2004 20:02:49 +0000 (20:02 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Mon, 3 May 2004 20:02:49 +0000 (20:02 +0000)
  x-get-selection.

lisp/ChangeLog
lisp/term/x-win.el

index 8c62f23c8f04fdc6225560ae630060c71e9016cb..f3a9555d10bfd4e910cfd02a8de6e3b170e59ef7 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-03  Jan D.  <jhd@gaffa.localdomain>
+
+       * term/x-win.el (x-clipboard-yank): Don't exit on error from
+       x-get-selection.
+
 2004-05-03  Jason Rumney  <jasonr@gnu.org>
 
        * makefile.nt: Remove.
index 4b419a57a978210287fed0d48a5466661d51e448..d97008094136542201794ea9045c72ce95d7ed4f 100644 (file)
@@ -2459,7 +2459,10 @@ order until succeed.")
 (defun x-clipboard-yank ()
   "Insert the clipboard contents, or the last stretch of killed text."
   (interactive)
-  (let ((clipboard-text (x-get-selection 'CLIPBOARD))
+  (let ((clipboard-text 
+        (condition-case nil
+            (x-get-selection 'CLIPBOARD)
+          (error nil)))
        (x-select-enable-clipboard t))
     (if (and clipboard-text (> (length clipboard-text) 0))
        (kill-new clipboard-text))