From: Richard M. Stallman Date: Mon, 16 Jul 2007 04:42:24 +0000 (+0000) Subject: (mouse-yank-secondary): Better error message if no secondary selection. X-Git-Tag: emacs-pretest-23.0.90~11888 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3709a532350a99de8aff662447a91d70dbb19b7;p=emacs.git (mouse-yank-secondary): Better error message if no secondary selection. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 47cd4978ef6..613fb8063c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-13 Drew Adams + + * mouse.el (mouse-yank-secondary): Better error message if no + secondary selection. + 2007-07-16 Dan Nicolaescu * vc-hooks.el (vc-handled-backends): Move BZR later in the list. 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.