* lisp/emulation/cua-base.el (cua-selection-mode): Make it toggle again.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 25 Apr 2011 18:17:17 +0000 (15:17 -0300)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 25 Apr 2011 18:17:17 +0000 (15:17 -0300)
lisp/ChangeLog
lisp/emulation/cua-base.el

index 34e2cc4..35f663e 100644 (file)
@@ -1,10 +1,14 @@
+2011-04-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emulation/cua-base.el (cua-selection-mode): Make it toggle again.
+
 2011-04-25  Michael Albinus  <michael.albinus@gmx.de>
 
-       * net/tramp.el (tramp-process-actions): Add POS argument.  Delete
-       region between POS and (pos).
+       * net/tramp.el (tramp-process-actions): Add POS argument.
+       Delete region between POS and (pos).
 
-       * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use
-       `nil' position in `tramp-process-actions' call.
+       * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
+       Use `nil' position in `tramp-process-actions' call.
        (tramp-maybe-open-connection): Call `tramp-process-actions' with pos.
 
        * net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `nil'
index 0df9e7b..b643d52 100644 (file)
@@ -1627,7 +1627,11 @@ shifted movement key, set `cua-highlight-region-shift-only'."
   "Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings."
   (interactive "P")
   (setq-default cua-enable-cua-keys nil)
-  (cua-mode arg))
+  (if (not (called-interactively-p 'any))
+      (cua-mode arg)
+    ;; Use call-interactive to turn a nil prefix arg into `toggle'.
+    (call-interactively 'cua-mode)
+    (customize-mark-as-set 'cua-enable-cua-keys)))
 
 
 (defun cua-debug ()