changeset 80330:5cfebf243949

(mouse-yank-secondary): Nice error msg if no secondary sel.
author Richard M. Stallman <rms@gnu.org>
date Thu, 13 Mar 2008 15:29:11 +0000
parents 1e134131412d
children ec291531e92c
files lisp/mouse.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Thu Mar 13 15:28:04 2008 +0000
+++ b/lisp/mouse.el	Thu Mar 13 15:29:11 2008 +0000
@@ -1642,7 +1642,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.