diff options
| author | Richard M. Stallman | 2007-12-25 20:09:05 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-12-25 20:09:05 +0000 |
| commit | 63571b5a84eaec1b14768d284f4613502810a1d7 (patch) | |
| tree | 9bd29456143c5784d38117c4590ada4fa05dfd5f | |
| parent | 98b2fff491674a78037fdf8a3239c286908d8627 (diff) | |
| download | emacs-63571b5a84eaec1b14768d284f4613502810a1d7.tar.gz emacs-63571b5a84eaec1b14768d284f4613502810a1d7.zip | |
(mouse-yank-primary): New function (almost same as mouse-yank-secondary).
| -rw-r--r-- | etc/NEWS | 14 | ||||
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/mouse.el | 14 |
3 files changed, 38 insertions, 3 deletions
| @@ -157,9 +157,13 @@ in Transient Mark mode should make commands operate on that empty region. | |||
| 157 | 157 | ||
| 158 | ** New command kill-matching-buffers kills buffers whose name matches a regexp. | 158 | ** New command kill-matching-buffers kills buffers whose name matches a regexp. |
| 159 | 159 | ||
| 160 | ** `interprogram-paste-function' can now return one string or a list | 160 | ** You can disable kill ring commands from accessing the primary selection |
| 161 | of strings. In the latter case, Emacs puts the second and following | 161 | by setting `x-select-enable-primary' to nil. |
| 162 | strings on the kill ring. | 162 | |
| 163 | ** If `select-active-regions' is t, setting the mark automatically | ||
| 164 | makes the new region into the primary selection (for interaction with | ||
| 165 | other window applications). If you enable this, you might want to bind | ||
| 166 | `mouse-yank-primary' to Mouse-2. | ||
| 163 | 167 | ||
| 164 | ** Minibuffer changes: | 168 | ** Minibuffer changes: |
| 165 | 169 | ||
| @@ -457,6 +461,10 @@ the specified files). | |||
| 457 | 461 | ||
| 458 | ** The new function `read-color' reads a color name using the minibuffer. | 462 | ** The new function `read-color' reads a color name using the minibuffer. |
| 459 | 463 | ||
| 464 | ** `interprogram-paste-function' can now return one string or a list | ||
| 465 | of strings. In the latter case, Emacs puts the second and following | ||
| 466 | strings on the kill ring. | ||
| 467 | |||
| 460 | ** Changes related to multiple tty support. | 468 | ** Changes related to multiple tty support. |
| 461 | 469 | ||
| 462 | *** $TERM is now set to `dumb' for subprocesses. If you want to know the | 470 | *** $TERM is now set to `dumb' for subprocesses. If you want to know the |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cca6ee0b296..27a302d7d01 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2007-12-25 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * simple.el (select-active-regions): New option. | ||
| 4 | (set-mark): Obey it. | ||
| 5 | |||
| 6 | 2007-12-25 David Golden <david.delaharpe.golden@gmail.com> (tiny change) | ||
| 7 | |||
| 8 | * term/x-win.el (x-select-enable-primary): New option. | ||
| 9 | (x-select-text, x-cut-buffer-or-selection-value): Obey it. | ||
| 10 | |||
| 11 | * mouse.el (mouse-yank-primary): New function (almost same | ||
| 12 | as mouse-yank-secondary). | ||
| 13 | |||
| 1 | 2007-12-25 Dan Nicolaescu <dann@ics.uci.edu> | 14 | 2007-12-25 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 15 | ||
| 3 | * calculator.el: | 16 | * calculator.el: |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 39882ca33c0..8802aa98317 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1358,6 +1358,20 @@ regardless of where you click." | |||
| 1358 | (setq mouse-selection-click-count 0) | 1358 | (setq mouse-selection-click-count 0) |
| 1359 | (yank arg)) | 1359 | (yank arg)) |
| 1360 | 1360 | ||
| 1361 | (defun mouse-yank-primary (click) | ||
| 1362 | "Insert the primary selection at the position clicked on. | ||
| 1363 | Move point to the end of the inserted text. | ||
| 1364 | If `mouse-yank-at-point' is non-nil, insert at point | ||
| 1365 | regardless of where you click." | ||
| 1366 | (interactive "e") | ||
| 1367 | ;; Give temporary modes such as isearch a chance to turn off. | ||
| 1368 | (run-hooks 'mouse-leave-buffer-hook) | ||
| 1369 | (or mouse-yank-at-point (mouse-set-point click)) | ||
| 1370 | (let ((primary (x-get-selection 'PRIMARY))) | ||
| 1371 | (if primary | ||
| 1372 | (insert (x-get-selection 'PRIMARY)) | ||
| 1373 | (error "No primary selection")))) | ||
| 1374 | |||
| 1361 | (defun mouse-kill-ring-save (click) | 1375 | (defun mouse-kill-ring-save (click) |
| 1362 | "Copy the region between point and the mouse click in the kill ring. | 1376 | "Copy the region between point and the mouse click in the kill ring. |
| 1363 | This does not delete the region; it acts like \\[kill-ring-save]." | 1377 | This does not delete the region; it acts like \\[kill-ring-save]." |