From: Richard M. Stallman Date: Thu, 13 Mar 2008 15:29:18 +0000 (+0000) Subject: (mouse-yank-secondary): Nice error msg if no secondary sel. X-Git-Tag: emacs-22.2~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4587349a792b5ffa10f075877ef53b6827db6400;p=emacs.git (mouse-yank-secondary): Nice error msg if no secondary sel. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7925e1cd2d..1b0026bfc21 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2008-03-13 Richard Stallman + * mouse.el (mouse-yank-secondary): Nice error msg if no secondary sel. + * emacs-lisp/advice.el (defadvice): Add usage pattern. 2008-03-11 Chong Yidong diff --git a/lisp/mouse.el b/lisp/mouse.el index 27bf00ce267..d0ce18dc519 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1642,7 +1642,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.