]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-yank-secondary): Nice error msg if no secondary sel.
authorRichard M. Stallman <rms@gnu.org>
Thu, 13 Mar 2008 15:29:18 +0000 (15:29 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 13 Mar 2008 15:29:18 +0000 (15:29 +0000)
lisp/ChangeLog
lisp/mouse.el

index c7925e1cd2dac19b15145326269a75d205d4b31b..1b0026bfc214613d336ebc562b1be73678310ca7 100644 (file)
@@ -1,5 +1,7 @@
 2008-03-13  Richard Stallman  <rms@gnu.org>
 
+       * 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  <cyd@stupidchicken.com>
index 27bf00ce26763b40e508ffb9be382a44d7eaeed4..d0ce18dc519a9eac331945d2397cb8b3c65f66da 100644 (file)
@@ -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.