]> code.delx.au - gnu-emacs/commitdiff
(mouse-yank-secondary): Better error message if no secondary selection.
authorRichard M. Stallman <rms@gnu.org>
Mon, 16 Jul 2007 04:42:24 +0000 (04:42 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 16 Jul 2007 04:42:24 +0000 (04:42 +0000)
lisp/ChangeLog
lisp/mouse.el

index 47cd4978ef6ac8fd4dddc24aaebdb792713e185d..613fb8063c66dcdd10d8c221743f779d606ec2a3 100644 (file)
@@ -1,3 +1,8 @@
+2007-07-13  Drew Adams  <drew.adams@oracle.com>
+
+       * mouse.el (mouse-yank-secondary): Better error message if no
+       secondary selection.
+
 2007-07-16  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * vc-hooks.el (vc-handled-backends): Move BZR later in the list.
index 5577b94d01a775370f5d82778fad7ce60551ea0b..ef46723b54dd0accbecba65ba8b5ad37054250a1 100644 (file)
@@ -1631,7 +1631,10 @@ regardless of where you click."
   ;; 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.