# HG changeset patch # User Richard M. Stallman # Date 1184560889 0 # Node ID 3bdde0e93c765c77a81c0caf51e480b5b06439bf # Parent 184879170b1657ad7959fd82b9e9379c3aca3d8b (mouse-yank-secondary): Better error message if no secondary selection. diff -r 184879170b16 -r 3bdde0e93c76 lisp/mouse.el --- 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.