diff options
| author | Kim F. Storm | 2004-04-30 21:37:43 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-04-30 21:37:43 +0000 |
| commit | b2dae92a19717dad61eb43480a76df01e63376fd (patch) | |
| tree | 619d02ab7cacab13435819dcbdeca7a048b1dd26 | |
| parent | 3b0af402818a5f522dbae99e11735c5a3882081a (diff) | |
| download | emacs-b2dae92a19717dad61eb43480a76df01e63376fd.tar.gz emacs-b2dae92a19717dad61eb43480a76df01e63376fd.zip | |
(mouse-drag-copy-region): New defcustom.
(mouse-set-region, mouse-drag-region-1): Use it.
| -rw-r--r-- | lisp/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/mouse.el | 16 |
2 files changed, 32 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c9a884fca61..b98e9b0532f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2004-04-30 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * mouse.el (mouse-drag-copy-region): New defcustom. | ||
| 4 | (mouse-set-region, mouse-drag-region-1): Use it. | ||
| 5 | |||
| 6 | * simple.el (kill-ring-save): If region face background color is | ||
| 7 | unspecified (if no highlighting), show extent of fully visible | ||
| 8 | region even if transient-mark-mode is enabled. | ||
| 9 | |||
| 10 | * emulation/cua-base.el (cua--standard-movement-commands): | ||
| 11 | Add cua-scroll-up and cua-scroll-down. | ||
| 12 | (cua-scroll-up, cua-scroll-down): New commands. | ||
| 13 | (cua--init-keymaps): Remap scroll-up and scroll-down. | ||
| 14 | |||
| 15 | * emulation/cua-rect.el (cua--convert-rectangle-as): | ||
| 16 | New defmacro. | ||
| 17 | (cua-upcase-rectangle, cua-downcase-rectangle): Use it. | ||
| 18 | (cua-upcase-initials-rectangle, cua-capitalize-rectangle): | ||
| 19 | New commands (suggested by Jordan Breeding).. | ||
| 20 | |||
| 1 | 2004-04-30 Juanma Barranquero <lektu@terra.es> | 21 | 2004-04-30 Juanma Barranquero <lektu@terra.es> |
| 2 | 22 | ||
| 3 | * smerge-mode.el (smerge-diff-switches): Fix typo in docstring. | 23 | * smerge-mode.el (smerge-diff-switches): Fix typo in docstring. |
diff --git a/lisp/mouse.el b/lisp/mouse.el index faa10e842d3..76098f45f1a 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -42,6 +42,12 @@ | |||
| 42 | "*If non-nil, mouse yank commands yank at point instead of at click." | 42 | "*If non-nil, mouse yank commands yank at point instead of at click." |
| 43 | :type 'boolean | 43 | :type 'boolean |
| 44 | :group 'mouse) | 44 | :group 'mouse) |
| 45 | |||
| 46 | (defcustom mouse-drag-copy-region t | ||
| 47 | "*If non-nil, mouse drag copies region to kill-ring." | ||
| 48 | :type 'boolean | ||
| 49 | :group 'mouse) | ||
| 50 | |||
| 45 | 51 | ||
| 46 | ;; Provide a mode-specific menu on a mouse button. | 52 | ;; Provide a mode-specific menu on a mouse button. |
| 47 | 53 | ||
| @@ -612,8 +618,9 @@ This should be bound to a mouse drag event." | |||
| 612 | ;; Don't set this-command to kill-region, so that a following | 618 | ;; Don't set this-command to kill-region, so that a following |
| 613 | ;; C-w will not double the text in the kill ring. | 619 | ;; C-w will not double the text in the kill ring. |
| 614 | ;; Ignore last-command so we don't append to a preceding kill. | 620 | ;; Ignore last-command so we don't append to a preceding kill. |
| 615 | (let (this-command last-command deactivate-mark) | 621 | (when mouse-drag-copy-region |
| 616 | (copy-region-as-kill (mark) (point))) | 622 | (let (this-command last-command deactivate-mark) |
| 623 | (copy-region-as-kill (mark) (point)))) | ||
| 617 | (mouse-set-region-1))) | 624 | (mouse-set-region-1))) |
| 618 | 625 | ||
| 619 | (defun mouse-set-region-1 () | 626 | (defun mouse-set-region-1 () |
| @@ -827,8 +834,9 @@ If the click is in the echo area, display the `*Messages*' buffer." | |||
| 827 | (push-mark region-commencement t t) | 834 | (push-mark region-commencement t t) |
| 828 | (goto-char region-termination) | 835 | (goto-char region-termination) |
| 829 | ;; Don't let copy-region-as-kill set deactivate-mark. | 836 | ;; Don't let copy-region-as-kill set deactivate-mark. |
| 830 | (let (deactivate-mark) | 837 | (when mouse-drag-copy-region |
| 831 | (copy-region-as-kill (point) (mark t))) | 838 | (let (deactivate-mark) |
| 839 | (copy-region-as-kill (point) (mark t)))) | ||
| 832 | (let ((buffer (current-buffer))) | 840 | (let ((buffer (current-buffer))) |
| 833 | (mouse-show-mark) | 841 | (mouse-show-mark) |
| 834 | ;; mouse-show-mark can call read-event, | 842 | ;; mouse-show-mark can call read-event, |