diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-12-08 01:24:54 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-12-08 01:24:54 -0500 |
commit | 6f8dfccfe3ec3e1137e712b49da12c8a9ab4bc85 (patch) | |
tree | ebe79741b1a81433ff73bd666e07626c1982bfbb /lisp/menu-bar.el | |
parent | 95b3d095f8791c9d0a2007f43fa4731401c64c87 (diff) | |
download | emacs-6f8dfccfe3ec3e1137e712b49da12c8a9ab4bc85.tar.gz emacs-6f8dfccfe3ec3e1137e712b49da12c8a9ab4bc85.tar.bz2 emacs-6f8dfccfe3ec3e1137e712b49da12c8a9ab4bc85.zip |
Use delete-selection-mode in cua-mode.
* lisp/emulation/cua-base.el (cua--prefix-copy-handler)
(cua--prefix-cut-handler): Rely on region-extract-function rather than
checking cua--rectangle.
(cua-delete-region): Use region-extract-function.
(cua-replace-region): Delete function.
(cua-copy-region, cua-cut-region): Obey region-extract-function.
(cua--pre-command-handler-1): Don't do the delete-selection thing.
(cua--self-insert-char-p): Ignore `self-insert-iso'.
(cua--init-keymaps): Don't remap delete-selection commands.
(cua-mode): Use delete-selection-mode instead of rolling our own.
* lisp/emulation/cua-rect.el (cua--rectangle-region-extract): New function.
(region-extract-function): Use it.
(cua-mouse-save-then-kill-rectangle): Use cua-copy-region.
(cua-copy-rectangle, cua-cut-rectangle, cua-delete-rectangle):
Delete functions.
(cua--init-rectangles): Don't re-remap copy-region-as-kill,
kill-ring-save, kill-region, delete-char, delete-forward-char.
Ignore self-insert-iso.
* lisp/menu-bar.el (clipboard-kill-ring-save, clipboard-kill-region):
Obey region-extract-function.
* lisp/emulation/cua-gmrk.el (cua--init-global-mark):
Ignore `self-insert-iso'.
Fixes: debbugs:16085
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r-- | lisp/menu-bar.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 13c4c36be17..9e267d26c9b 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -545,17 +545,17 @@ (let ((x-select-enable-clipboard t)) (yank))) -(defun clipboard-kill-ring-save (beg end) +(defun clipboard-kill-ring-save (beg end &optional region) "Copy region to kill ring, and save in the X clipboard." - (interactive "r") + (interactive "r\np") (let ((x-select-enable-clipboard t)) - (kill-ring-save beg end))) + (kill-ring-save beg end region))) -(defun clipboard-kill-region (beg end) +(defun clipboard-kill-region (beg end &optional region) "Kill the region, and save it in the X clipboard." - (interactive "r") + (interactive "r\np") (let ((x-select-enable-clipboard t)) - (kill-region beg end))) + (kill-region beg end region))) (defun menu-bar-enable-clipboard () "Make CUT, PASTE and COPY (keys and menu bar items) use the clipboard. |