diff options
| author | Chong Yidong | 2011-10-29 14:09:02 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-10-29 14:09:02 +0800 |
| commit | e1eb5385bb8c30e9a9ff3b04b0928664e3440e01 (patch) | |
| tree | 96151552fe2dd34ae2d6852a48f8c80e792ff980 | |
| parent | 5d2ece3cd22aed2a89f51c315564605d52ebf382 (diff) | |
| download | emacs-e1eb5385bb8c30e9a9ff3b04b0928664e3440e01.tar.gz emacs-e1eb5385bb8c30e9a9ff3b04b0928664e3440e01.zip | |
* lisp/mouse.el (mouse-yank-primary): Push the mark.
Fixes: debbugs:9894
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/mouse.el | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 340ca33231f..7565548fe53 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-10-29 Chong Yidong <cyd@gnu.org> | 1 | 2011-10-29 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * mouse.el (mouse-yank-primary): Push the mark (Bug#9894). | ||
| 4 | |||
| 3 | * textmodes/flyspell.el (flyspell-word): Fix char offset for | 5 | * textmodes/flyspell.el (flyspell-word): Fix char offset for |
| 4 | forged Ispell output (Bug#7904). | 6 | forged Ispell output (Bug#7904). |
| 5 | 7 | ||
diff --git a/lisp/mouse.el b/lisp/mouse.el index 9b1cf48ccdc..615062dc031 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1133,8 +1133,8 @@ regardless of where you click." | |||
| 1133 | 1133 | ||
| 1134 | (defun mouse-yank-primary (click) | 1134 | (defun mouse-yank-primary (click) |
| 1135 | "Insert the primary selection at the position clicked on. | 1135 | "Insert the primary selection at the position clicked on. |
| 1136 | Move point to the end of the inserted text. | 1136 | Move point to the end of the inserted text, and set mark at |
| 1137 | If `mouse-yank-at-point' is non-nil, insert at point | 1137 | beginning. If `mouse-yank-at-point' is non-nil, insert at point |
| 1138 | regardless of where you click." | 1138 | regardless of where you click." |
| 1139 | (interactive "e") | 1139 | (interactive "e") |
| 1140 | ;; Give temporary modes such as isearch a chance to turn off. | 1140 | ;; Give temporary modes such as isearch a chance to turn off. |
| @@ -1162,9 +1162,10 @@ regardless of where you click." | |||
| 1162 | ;; FIXME: What about xterm-mouse-mode etc.? | 1162 | ;; FIXME: What about xterm-mouse-mode etc.? |
| 1163 | (t | 1163 | (t |
| 1164 | (x-get-selection 'PRIMARY))))) | 1164 | (x-get-selection 'PRIMARY))))) |
| 1165 | (if primary | 1165 | (unless primary |
| 1166 | (insert primary) | 1166 | (error "No selection is available")) |
| 1167 | (error "No selection is available")))) | 1167 | (push-mark (point)) |
| 1168 | (insert primary))) | ||
| 1168 | 1169 | ||
| 1169 | (defun mouse-kill-ring-save (click) | 1170 | (defun mouse-kill-ring-save (click) |
| 1170 | "Copy the region between point and the mouse click in the kill ring. | 1171 | "Copy the region between point and the mouse click in the kill ring. |