diff options
author | Chong Yidong <cyd@gnu.org> | 2012-04-13 15:10:11 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-04-13 15:10:11 +0800 |
commit | 9557e2beb204f24dc13bac994fd1f42271999f05 (patch) | |
tree | 02923b5e70c639a28ed2b4fbc19585e21248c001 /lisp | |
parent | 03ed9e82adda3f6856a12e718fad023bb8b06502 (diff) | |
download | emacs-9557e2beb204f24dc13bac994fd1f42271999f05.tar.gz |
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
Diffstat (limited to 'lisp')
-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 @@ +2012-04-13 Kim F. Storm <storm@cua.dk> + + * emulation/cua-base.el (cua-exchange-point-and-mark): Just call + exchange-point-and-mark if cua-enable-cua-keys is nil (Bug#11191). + 2012-04-12 Chong Yidong <cyd@gnu.org> * 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'." (setq this-command 'cua-paste-pop)))) (defun cua-exchange-point-and-mark (arg) - "Exchanges point and mark, but don't activate the mark. -Activates the mark if a prefix argument is given." + "Exchange point and mark. +Don't activate the mark if `cua-enable-cua-keys' is non-nil. +Otherwise, just activate the mark if a prefix ARG is given. + +See also `exchange-point-and-mark'." (interactive "P") - (if arg - (setq mark-active t) - (let (mark-active) - (exchange-point-and-mark) - (if cua--rectangle - (cua--rectangle-corner 0))))) + (cond ((null cua-enable-cua-keys) + (exchange-point-and-mark arg)) + (arg + (setq mark-active t)) + (t + (let (mark-active) + (exchange-point-and-mark) + (if cua--rectangle + (cua--rectangle-corner 0)))))) ;; Typed text that replaced the highlighted region. (defvar cua--repeat-replace-text nil) |