aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2014-11-07 14:55:39 -0500
committerStefan Monnier2014-11-07 14:55:39 -0500
commit06ee88e490baa46bc81311f9ade8f01dfe858311 (patch)
tree0dd3e8cd64a0d5d549196aa211d94734d7026217 /lisp
parent2a1f6afdfe72805724f06ca303e2146d93533285 (diff)
downloademacs-06ee88e490baa46bc81311f9ade8f01dfe858311.tar.gz
emacs-06ee88e490baa46bc81311f9ade8f01dfe858311.zip
* lisp/emulation/cua-base.el (cua--select-keymaps): Use region-active-p.
(cua-set-mark, cua--pre-command-handler-1,cua--post-command-handler-1): * lisp/emulation/cua-gmrk.el (cua-cancel-global-mark): Same. Fixes: debbugs:18952
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/emulation/cua-base.el8
-rw-r--r--lisp/emulation/cua-gmrk.el2
3 files changed, 12 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7c7683a5f82..a41e298ecbc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12014-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emulation/cua-base.el (cua--select-keymaps): Use region-active-p
4 (bug#18952).
5 (cua-set-mark, cua--pre-command-handler-1,cua--post-command-handler-1):
6 * emulation/cua-gmrk.el (cua-cancel-global-mark): Same.
7
12014-11-07 Michael Albinus <michael.albinus@gmx.de> 82014-11-07 Michael Albinus <michael.albinus@gmx.de>
2 9
3 * files.el (file-name-non-special): Wrap the call of 10 * files.el (file-name-non-special): Wrap the call of
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 2f321f74b97..a378f672386 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1015,7 +1015,7 @@ With a double \\[universal-argument] prefix argument, unconditionally set mark."
1015 (or (and cua-auto-mark-last-change 1015 (or (and cua-auto-mark-last-change
1016 (cua-pop-to-last-change)) 1016 (cua-pop-to-last-change))
1017 (pop-to-mark-command))) 1017 (pop-to-mark-command)))
1018 ((and cua-toggle-set-mark mark-active) 1018 ((and cua-toggle-set-mark (region-active-p))
1019 (cua--deactivate) 1019 (cua--deactivate)
1020 (message "Mark cleared")) 1020 (message "Mark cleared"))
1021 (t 1021 (t
@@ -1114,7 +1114,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1114 1114
1115 ;; Set mark if user explicitly said to do so 1115 ;; Set mark if user explicitly said to do so
1116 (cua--rectangle ;FIXME: ?? 1116 (cua--rectangle ;FIXME: ??
1117 (unless mark-active 1117 (unless (region-active-p)
1118 (push-mark-command nil nil)))) 1118 (push-mark-command nil nil))))
1119 1119
1120 ;; Detect extension of rectangles by mouse or other movement 1120 ;; Detect extension of rectangles by mouse or other movement
@@ -1140,7 +1140,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1140 (if cua--debug 1140 (if cua--debug
1141 (cond 1141 (cond
1142 (cua--rectangle (cua--rectangle-assert)) 1142 (cua--rectangle (cua--rectangle-assert))
1143 (mark-active (message "Mark=%d Point=%d" (mark t) (point))))) 1143 ((region-active-p) (message "Mark=%d Point=%d" (mark t) (point)))))
1144 1144
1145 (if cua-enable-cursor-indications 1145 (if cua-enable-cursor-indications
1146 (cua--update-indications)) 1146 (cua--update-indications))
@@ -1199,7 +1199,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1199(defun cua--select-keymaps () 1199(defun cua--select-keymaps ()
1200 ;; Setup conditions for selecting the proper keymaps in cua--keymap-alist. 1200 ;; Setup conditions for selecting the proper keymaps in cua--keymap-alist.
1201 (setq cua--ena-region-keymap 1201 (setq cua--ena-region-keymap
1202 (and mark-active (not deactivate-mark))) 1202 (and (region-active-p) (not deactivate-mark)))
1203 (setq cua--ena-prefix-override-keymap 1203 (setq cua--ena-prefix-override-keymap
1204 (and cua--ena-region-keymap 1204 (and cua--ena-region-keymap
1205 cua-enable-cua-keys 1205 cua-enable-cua-keys
diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el
index b77b2105f64..3d6c9d62a26 100644
--- a/lisp/emulation/cua-gmrk.el
+++ b/lisp/emulation/cua-gmrk.el
@@ -321,7 +321,7 @@ With prefix argument, don't jump to global mark when canceling it."
321(defun cua-cancel-global-mark () 321(defun cua-cancel-global-mark ()
322 "Cancel the global mark." 322 "Cancel the global mark."
323 (interactive) 323 (interactive)
324 (if mark-active 324 (if (region-active-p)
325 (cua-cancel) 325 (cua-cancel)
326 (if (cua--global-mark-active) 326 (if (cua--global-mark-active)
327 (cua--deactivate-global-mark t))) 327 (cua--deactivate-global-mark t)))