mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
(mouse-drag-copy-region): New defcustom.
(mouse-set-region, mouse-drag-region-1): Use it.
This commit is contained in:
parent
3b0af40281
commit
b2dae92a19
@ -1,3 +1,23 @@
|
||||
2004-04-30 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* mouse.el (mouse-drag-copy-region): New defcustom.
|
||||
(mouse-set-region, mouse-drag-region-1): Use it.
|
||||
|
||||
* simple.el (kill-ring-save): If region face background color is
|
||||
unspecified (if no highlighting), show extent of fully visible
|
||||
region even if transient-mark-mode is enabled.
|
||||
|
||||
* emulation/cua-base.el (cua--standard-movement-commands):
|
||||
Add cua-scroll-up and cua-scroll-down.
|
||||
(cua-scroll-up, cua-scroll-down): New commands.
|
||||
(cua--init-keymaps): Remap scroll-up and scroll-down.
|
||||
|
||||
* emulation/cua-rect.el (cua--convert-rectangle-as):
|
||||
New defmacro.
|
||||
(cua-upcase-rectangle, cua-downcase-rectangle): Use it.
|
||||
(cua-upcase-initials-rectangle, cua-capitalize-rectangle):
|
||||
New commands (suggested by Jordan Breeding)..
|
||||
|
||||
2004-04-30 Juanma Barranquero <lektu@terra.es>
|
||||
|
||||
* smerge-mode.el (smerge-diff-switches): Fix typo in docstring.
|
||||
|
@ -42,6 +42,12 @@
|
||||
"*If non-nil, mouse yank commands yank at point instead of at click."
|
||||
:type 'boolean
|
||||
:group 'mouse)
|
||||
|
||||
(defcustom mouse-drag-copy-region t
|
||||
"*If non-nil, mouse drag copies region to kill-ring."
|
||||
:type 'boolean
|
||||
:group 'mouse)
|
||||
|
||||
|
||||
;; Provide a mode-specific menu on a mouse button.
|
||||
|
||||
@ -612,8 +618,9 @@ This should be bound to a mouse drag event."
|
||||
;; Don't set this-command to kill-region, so that a following
|
||||
;; C-w will not double the text in the kill ring.
|
||||
;; Ignore last-command so we don't append to a preceding kill.
|
||||
(let (this-command last-command deactivate-mark)
|
||||
(copy-region-as-kill (mark) (point)))
|
||||
(when mouse-drag-copy-region
|
||||
(let (this-command last-command deactivate-mark)
|
||||
(copy-region-as-kill (mark) (point))))
|
||||
(mouse-set-region-1)))
|
||||
|
||||
(defun mouse-set-region-1 ()
|
||||
@ -827,8 +834,9 @@ If the click is in the echo area, display the `*Messages*' buffer."
|
||||
(push-mark region-commencement t t)
|
||||
(goto-char region-termination)
|
||||
;; Don't let copy-region-as-kill set deactivate-mark.
|
||||
(let (deactivate-mark)
|
||||
(copy-region-as-kill (point) (mark t)))
|
||||
(when mouse-drag-copy-region
|
||||
(let (deactivate-mark)
|
||||
(copy-region-as-kill (point) (mark t))))
|
||||
(let ((buffer (current-buffer)))
|
||||
(mouse-show-mark)
|
||||
;; mouse-show-mark can call read-event,
|
||||
|
Loading…
Reference in New Issue
Block a user