diff options
| author | Kim F. Storm | 2005-04-18 19:50:07 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-04-18 19:50:07 +0000 |
| commit | 1338947ca028dde8f4ee6fb670b96747c406ac82 (patch) | |
| tree | 322290ecafe31b6481de992747b03523ac6b3fa2 | |
| parent | 77580d1801386bbf82a77631945d2dc7b65326b4 (diff) | |
| download | emacs-1338947ca028dde8f4ee6fb670b96747c406ac82.tar.gz emacs-1338947ca028dde8f4ee6fb670b96747c406ac82.zip | |
(cua--pre-command-handler): Add more
elaborate check for shift modifier on non-window systems.
| -rw-r--r-- | lisp/emulation/cua-base.el | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 77e8f636931..6aeb4bab5a2 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." | |||
| 1066 | ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. | 1066 | ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. |
| 1067 | (if movement | 1067 | (if movement |
| 1068 | (cond | 1068 | (cond |
| 1069 | ((memq 'shift (event-modifiers | 1069 | ((if window-system |
| 1070 | (aref (if window-system | 1070 | (memq 'shift (event-modifiers |
| 1071 | (this-single-command-raw-keys) | 1071 | (aref (this-single-command-raw-keys) 0))) |
| 1072 | (this-single-command-keys)) 0))) | 1072 | (or |
| 1073 | (memq 'shift (event-modifiers | ||
| 1074 | (aref (this-single-command-keys) 0))) | ||
| 1075 | ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home. | ||
| 1076 | (and (boundp 'function-key-map) | ||
| 1077 | function-key-map | ||
| 1078 | (let ((ev (lookup-key function-key-map | ||
| 1079 | (this-single-command-raw-keys)))) | ||
| 1080 | (and (vector ev) | ||
| 1081 | (symbolp (setq ev (aref ev 0))) | ||
| 1082 | (string-match "S-" (symbol-name ev))))))) | ||
| 1073 | (unless mark-active | 1083 | (unless mark-active |
| 1074 | (push-mark-command nil t)) | 1084 | (push-mark-command nil t)) |
| 1075 | (setq cua--last-region-shifted t) | 1085 | (setq cua--last-region-shifted t) |