diff options
author | Glenn Morris <rgm@gnu.org> | 2012-04-13 18:46:06 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-04-13 18:46:06 -0700 |
commit | 35dc09a19c606f9e7a078df32d030451c7c90ba1 (patch) | |
tree | 8df2ade99ad8620568094d61bba9dd4ac8856c43 /lisp/emulation | |
parent | 327732d994c98849c765659aa2164a7482b6beab (diff) | |
parent | ad3a2b411dc2b34f5d6fa434aee3ca56fa7a88e7 (diff) | |
download | emacs-35dc09a19c606f9e7a078df32d030451c7c90ba1.tar.gz |
Merge from emacs-24, up to 2012-04-10T02:06:19Z!larsi@gnus.org
Diffstat (limited to 'lisp/emulation')
-rw-r--r-- | lisp/emulation/cua-base.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 22d80944e5c..ba6127b4cba 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) |