summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2007-07-16 04:42:24 +0000
committerRichard M. Stallman <rms@gnu.org>2007-07-16 04:42:24 +0000
commitb3709a532350a99de8aff662447a91d70dbb19b7 (patch)
treeea20cc08c0ff16067ae75e1085df31c145882f6a /lisp/mouse.el
parentdbd3d78766644e9f16d6699e8538c1260e67a428 (diff)
downloademacs-b3709a532350a99de8aff662447a91d70dbb19b7.tar.gz
(mouse-yank-secondary): Better error message if no secondary selection.
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.