Mercurial > emacs
comparison lisp/emulation/cua-base.el @ 61642:38e5ee03d4a9
(cua--pre-command-handler): Add more
elaborate check for shift modifier on non-window systems.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 18 Apr 2005 19:50:07 +0000 |
parents | 15ece4eaca8d |
children | b8e64f81f45f e1fbb019c538 |
comparison
equal
deleted
inserted
replaced
61641:f108d1ce31f8 | 61642:38e5ee03d4a9 |
---|---|
1064 ;; If region is not active, region is activated if key is shifted. | 1064 ;; If region is not active, region is activated if key is shifted. |
1065 ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). | 1065 ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). |
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) |
1076 (setq cua--explicit-region-start nil)) | 1086 (setq cua--explicit-region-start nil)) |
1077 ((or cua--explicit-region-start cua--rectangle) | 1087 ((or cua--explicit-region-start cua--rectangle) |