emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107824: Fix for C-x C-x in cua-se


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107824: Fix for C-x C-x in cua-selection-mode.
Date: Fri, 13 Apr 2012 15:10:11 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107824
fixes bug(s): http://debbugs.gnu.org/11191
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-04-13 15:10:11 +0800
message:
  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.
modified:
  lisp/ChangeLog
  lisp/emulation/cua-base.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-12 14:50:58 +0000
+++ b/lisp/ChangeLog    2012-04-13 07:10:11 +0000
@@ -1,3 +1,8 @@
+2012-04-13  Kim F. Storm  <address@hidden>
+
+       * 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  <address@hidden>
 
        * custom.el (custom-theme-set-variables): Doc fix.

=== modified file 'lisp/emulation/cua-base.el'
--- a/lisp/emulation/cua-base.el        2012-03-10 08:26:45 +0000
+++ b/lisp/emulation/cua-base.el        2012-04-13 07:10:11 +0000
@@ -1002,15 +1002,21 @@
     (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]