[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106229: * lisp/mouse.el (mouse-yank-
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106229: * lisp/mouse.el (mouse-yank-primary): Push the mark. |
Date: |
Sat, 29 Oct 2011 14:09:02 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106229
fixes bug(s): http://debbugs.gnu.org/9894
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-10-29 14:09:02 +0800
message:
* lisp/mouse.el (mouse-yank-primary): Push the mark.
modified:
lisp/ChangeLog
lisp/mouse.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-29 04:37:29 +0000
+++ b/lisp/ChangeLog 2011-10-29 06:09:02 +0000
@@ -1,5 +1,7 @@
2011-10-29 Chong Yidong <address@hidden>
+ * mouse.el (mouse-yank-primary): Push the mark (Bug#9894).
+
* textmodes/flyspell.el (flyspell-word): Fix char offset for
forged Ispell output (Bug#7904).
=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el 2011-10-22 17:06:13 +0000
+++ b/lisp/mouse.el 2011-10-29 06:09:02 +0000
@@ -1133,8 +1133,8 @@
(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 @@
;; 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106229: * lisp/mouse.el (mouse-yank-primary): Push the mark.,
Chong Yidong <=