summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5577b94d01a..ef46723b54d 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -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.