]> code.delx.au - gnu-emacs/blobdiff - lisp/mouse.el
Correct two search limits in c-before-change-check_<>-operators.
[gnu-emacs] / lisp / mouse.el
index 9b1cf48ccdc5466f916ac65b9698ff3190369283..2e1194837975fcded708f2829ba81345590e58ea 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mouse.el --- window system-independent mouse support
 
-;; Copyright (C) 1993-1995, 1999-2011  Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 1999-2012  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: hardware, mouse
@@ -62,7 +62,7 @@ typically sets point where you click the mouse).
 If value is an integer, the time elapsed between pressing and
 releasing the mouse button determines whether to follow the link
 or perform the normal Mouse-1 action (typically set point).
-The absolute numeric value specifices the maximum duration of a
+The absolute numeric value specifies the maximum duration of a
 \"short click\" in milliseconds.  A positive value means that a
 short click follows the link, and a longer click performs the
 normal action.  A negative value gives the opposite behavior.
@@ -1133,8 +1133,8 @@ regardless of where you click."
 
 (defun mouse-yank-primary (click)
   "Insert the primary selection at the position clicked on.
-Move point to the end of the inserted text.
-If `mouse-yank-at-point' is non-nil, insert at point
+Move point to the end of the inserted text, and set mark at
+beginning.  If `mouse-yank-at-point' is non-nil, insert at point
 regardless of where you click."
   (interactive "e")
   ;; Give temporary modes such as isearch a chance to turn off.
@@ -1162,9 +1162,10 @@ regardless of where you click."
          ;; FIXME: What about xterm-mouse-mode etc.?
          (t
           (x-get-selection 'PRIMARY)))))
-    (if primary
-        (insert primary)
-      (error "No selection is available"))))
+    (unless primary
+      (error "No selection is available"))
+    (push-mark (point))
+    (insert primary)))
 
 (defun mouse-kill-ring-save (click)
   "Copy the region between point and the mouse click in the kill ring.