# HG changeset patch # User Kim F. Storm # Date 1113853807 0 # Node ID 38e5ee03d4a9ae6307b5dd95486ea57a79456c19 # Parent f108d1ce31f81821597d9d2cc4266acc30bf1d90 (cua--pre-command-handler): Add more elaborate check for shift modifier on non-window systems. diff -r f108d1ce31f8 -r 38e5ee03d4a9 lisp/emulation/cua-base.el --- a/lisp/emulation/cua-base.el Mon Apr 18 19:49:40 2005 +0000 +++ b/lisp/emulation/cua-base.el Mon Apr 18 19:50:07 2005 +0000 @@ -1066,10 +1066,20 @@ ;; 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)