changeset 81903:3bdde0e93c76

(mouse-yank-secondary): Better error message if no secondary selection.
author Richard M. Stallman <rms@gnu.org>
date Mon, 16 Jul 2007 04:41:29 +0000
parents 184879170b16
children a10ef6f97de7
files lisp/mouse.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Mon Jul 16 04:25:51 2007 +0000
+++ b/lisp/mouse.el	Mon Jul 16 04:41:29 2007 +0000
@@ -1631,7 +1631,10 @@
   ;; Give temporary modes such as isearch a chance to turn off.
   (run-hooks 'mouse-leave-buffer-hook)
   (or mouse-yank-at-point (mouse-set-point click))
-  (insert (x-get-selection 'SECONDARY)))
+  (let ((secondary (x-get-selection 'SECONDARY)))
+    (if secondary
+        (insert (x-get-selection 'SECONDARY))
+      (error "No secondary selection"))))
 
 (defun mouse-kill-secondary ()
   "Kill the text in the secondary selection.