diff options
| author | Chong Yidong | 2012-04-13 15:10:11 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-13 15:10:11 +0800 |
| commit | 9557e2beb204f24dc13bac994fd1f42271999f05 (patch) | |
| tree | 02923b5e70c639a28ed2b4fbc19585e21248c001 | |
| parent | 03ed9e82adda3f6856a12e718fad023bb8b06502 (diff) | |
| download | emacs-9557e2beb204f24dc13bac994fd1f42271999f05.tar.gz emacs-9557e2beb204f24dc13bac994fd1f42271999f05.zip | |
Fix for C-x C-x in cua-selection-mode.
* emulation/cua-base.el (cua-exchange-point-and-mark): Just call
exchange-point-and-mark if cua-enable-cua-keys is nil.
Fixes: debbugs:11191
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emulation/cua-base.el | 22 |
2 files changed, 19 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7469ddb015..4b031a5dfe9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-13 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * emulation/cua-base.el (cua-exchange-point-and-mark): Just call | ||
| 4 | exchange-point-and-mark if cua-enable-cua-keys is nil (Bug#11191). | ||
| 5 | |||
| 1 | 2012-04-12 Chong Yidong <cyd@gnu.org> | 6 | 2012-04-12 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * custom.el (custom-theme-set-variables): Doc fix. | 8 | * custom.el (custom-theme-set-variables): Doc fix. |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index a918f298a4e..c31f634dd5c 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1002,15 +1002,21 @@ behavior, see `cua-paste-pop-rotate-temporarily'." | |||
| 1002 | (setq this-command 'cua-paste-pop)))) | 1002 | (setq this-command 'cua-paste-pop)))) |
| 1003 | 1003 | ||
| 1004 | (defun cua-exchange-point-and-mark (arg) | 1004 | (defun cua-exchange-point-and-mark (arg) |
| 1005 | "Exchanges point and mark, but don't activate the mark. | 1005 | "Exchange point and mark. |
| 1006 | Activates the mark if a prefix argument is given." | 1006 | Don't activate the mark if `cua-enable-cua-keys' is non-nil. |
| 1007 | Otherwise, just activate the mark if a prefix ARG is given. | ||
| 1008 | |||
| 1009 | See also `exchange-point-and-mark'." | ||
| 1007 | (interactive "P") | 1010 | (interactive "P") |
| 1008 | (if arg | 1011 | (cond ((null cua-enable-cua-keys) |
| 1009 | (setq mark-active t) | 1012 | (exchange-point-and-mark arg)) |
| 1010 | (let (mark-active) | 1013 | (arg |
| 1011 | (exchange-point-and-mark) | 1014 | (setq mark-active t)) |
| 1012 | (if cua--rectangle | 1015 | (t |
| 1013 | (cua--rectangle-corner 0))))) | 1016 | (let (mark-active) |
| 1017 | (exchange-point-and-mark) | ||
| 1018 | (if cua--rectangle | ||
| 1019 | (cua--rectangle-corner 0)))))) | ||
| 1014 | 1020 | ||
| 1015 | ;; Typed text that replaced the highlighted region. | 1021 | ;; Typed text that replaced the highlighted region. |
| 1016 | (defvar cua--repeat-replace-text nil) | 1022 | (defvar cua--repeat-replace-text nil) |