aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-04-13 09:32:37 -0400
committerStefan Monnier2012-04-13 09:32:37 -0400
commite75e89ba4131339e952dc7628d6b29a31ad377c5 (patch)
tree5893c5cad5fd2b6f5f038c17f559cf0a9a01210a
parent031fabfc1ac028fe9826faf6caf4cfa8ebeaf7d6 (diff)
downloademacs-e75e89ba4131339e952dc7628d6b29a31ad377c5.tar.gz
emacs-e75e89ba4131339e952dc7628d6b29a31ad377c5.zip
* lisp/emulation/cua-base.el (cua--pre-command-handler-1): Don't activate
the region on shift if the binding is already shifted. Fixes: debbugs:11221
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emulation/cua-base.el17
2 files changed, 6 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 35caa29f7e1..0a3f3b8f855 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emulation/cua-base.el (cua--pre-command-handler-1): Don't activate
4 the region on shift if the binding is already shifted (bug#11221).
5
12012-04-12 Glenn Morris <rgm@gnu.org> 62012-04-12 Glenn Morris <rgm@gnu.org>
2 7
3 * mail/mailpost.el: Move to obsolete/. 8 * mail/mailpost.el: Move to obsolete/.
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index a918f298a4e..22d80944e5c 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1246,22 +1246,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1246 ;; (and region not started with C-SPC). 1246 ;; (and region not started with C-SPC).
1247 ;; If rectangle is active, expand rectangle in specified direction and 1247 ;; If rectangle is active, expand rectangle in specified direction and
1248 ;; ignore the movement. 1248 ;; ignore the movement.
1249 ((if window-system 1249 (this-command-keys-shift-translated
1250 ;; Shortcut for window-system, assuming that input-decode-map is empty.
1251 (memq 'shift (event-modifiers
1252 (aref (this-single-command-raw-keys) 0)))
1253 (or
1254 ;; Check if the final key-sequence was shifted.
1255 (memq 'shift (event-modifiers
1256 (aref (this-single-command-keys) 0)))
1257 ;; If not, maybe the raw key-sequence was mapped by input-decode-map
1258 ;; to a shifted key (and then mapped down to its unshifted form).
1259 (let* ((keys (this-single-command-raw-keys))
1260 (ev (lookup-key input-decode-map keys)))
1261 (or (and (vector ev) (memq 'shift (event-modifiers (aref ev 0))))
1262 ;; Or maybe, the raw key-sequence was not an escape sequence
1263 ;; and was shifted (and then mapped down to its unshifted form).
1264 (memq 'shift (event-modifiers (aref keys 0)))))))
1265 (unless mark-active 1250 (unless mark-active
1266 (push-mark-command nil t)) 1251 (push-mark-command nil t))
1267 (setq cua--last-region-shifted t) 1252 (setq cua--last-region-shifted t)