aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2005-04-18 19:50:07 +0000
committerKim F. Storm <[email protected]>2005-04-18 19:50:07 +0000
commit1338947ca028dde8f4ee6fb670b96747c406ac82 (patch)
tree322290ecafe31b6481de992747b03523ac6b3fa2 /lisp/emulation
parent77580d1801386bbf82a77631945d2dc7b65326b4 (diff)
(cua--pre-command-handler): Add more
elaborate check for shift modifier on non-window systems.
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/cua-base.el18
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 77e8f63693..6aeb4bab5a 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1066,10 +1066,20 @@ If ARG is the atom `-', scroll upward by nearly full screen."
;; If rectangle is active, expand rectangle in specified direction and ignore the movement.
(if movement
(cond
- ((memq 'shift (event-modifiers
- (aref (if window-system
- (this-single-command-raw-keys)
- (this-single-command-keys)) 0)))
+ ((if window-system
+ (memq 'shift (event-modifiers
+ (aref (this-single-command-raw-keys) 0)))
+ (or
+ (memq 'shift (event-modifiers
+ (aref (this-single-command-keys) 0)))
+ ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home.
+ (and (boundp 'function-key-map)
+ function-key-map
+ (let ((ev (lookup-key function-key-map
+ (this-single-command-raw-keys))))
+ (and (vector ev)
+ (symbolp (setq ev (aref ev 0)))
+ (string-match "S-" (symbol-name ev)))))))
(unless mark-active
(push-mark-command nil t))
(setq cua--last-region-shifted t)