/[emacs]/emacs/lisp/emulation/cua-base.el
ViewVC logotype

Diff of /emacs/lisp/emulation/cua-base.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.63 by rfrancoise, Fri Oct 7 12:43:56 2005 UTC revision 1.64 by kfstorm, Thu Dec 8 14:12:12 2005 UTC
# Line 1232  If ARG is the atom `-', scroll upward by Line 1232  If ARG is the atom `-', scroll upward by
1232               (not cua--prefix-override-timer)))               (not cua--prefix-override-timer)))
1233    (setq cua--ena-prefix-repeat-keymap    (setq cua--ena-prefix-repeat-keymap
1234          (and cua--ena-region-keymap          (and cua--ena-region-keymap
1235               (timerp cua--prefix-override-timer)))               (or (timerp cua--prefix-override-timer)
1236                     (eq cua--prefix-override-timer 'shift))))
1237    (setq cua--ena-cua-keys-keymap    (setq cua--ena-cua-keys-keymap
1238          (and cua-enable-cua-keys          (and cua-enable-cua-keys
1239               (not cua-inhibit-cua-keys)               (not cua-inhibit-cua-keys)
# Line 1244  If ARG is the atom `-', scroll upward by Line 1245  If ARG is the atom `-', scroll upward by
1245    
1246  (defvar cua--keymaps-initalized nil)  (defvar cua--keymaps-initalized nil)
1247    
1248    (defun cua--shift-control-prefix (prefix arg)
1249      ;; handle S-C-x and S-C-c by emulating the fast double prefix function.
1250      ;; Don't record this command
1251      (setq this-command last-command)
1252      ;; Restore the prefix arg
1253      (setq prefix-arg arg)
1254      (reset-this-command-lengths)
1255      ;; Activate the cua--prefix-repeat-keymap
1256      (setq cua--prefix-override-timer 'shift)
1257      ;; Push duplicate keys back on the event queue
1258      (setq unread-command-events (cons prefix (cons prefix unread-command-events))))
1259    
1260    (defun cua--shift-control-c-prefix (arg)
1261      (interactive "P")
1262      (cua--shift-control-prefix ?\C-c arg))
1263    
1264    (defun cua--shift-control-x-prefix (arg)
1265      (interactive "P")
1266      (cua--shift-control-prefix ?\C-x arg))
1267    
1268  (defun cua--init-keymaps ()  (defun cua--init-keymaps ()
1269    (unless (eq cua-use-hyper-key 'only)    (unless (eq cua-use-hyper-key 'only)
1270      (define-key cua-global-keymap [(control return)]    'cua-set-rectangle-mark))      (define-key cua-global-keymap [(control return)]    'cua-set-rectangle-mark))
# Line 1287  If ARG is the atom `-', scroll upward by Line 1308  If ARG is the atom `-', scroll upward by
1308    (define-key cua--prefix-repeat-keymap [(control c) right] 'cua--prefix-copy-handler)    (define-key cua--prefix-repeat-keymap [(control c) right] 'cua--prefix-copy-handler)
1309    
1310    ;; Enable shifted fallbacks for C-x and C-c when region is active    ;; Enable shifted fallbacks for C-x and C-c when region is active
1311    (define-key cua--region-keymap [(shift control x)] 'Control-X-prefix)    (define-key cua--region-keymap [(shift control x)] 'cua--shift-control-x-prefix)
1312    (define-key cua--region-keymap [(shift control c)] 'mode-specific-command-prefix)    (define-key cua--region-keymap [(shift control c)] 'cua--shift-control-c-prefix)
1313    
1314    ;; replace current region    ;; replace current region
1315    (define-key cua--region-keymap [remap self-insert-command]    'cua-replace-region)    (define-key cua--region-keymap [remap self-insert-command]    'cua-replace-region)
1316    (define-key cua--region-keymap [remap self-insert-iso]        'cua-replace-region)    (define-key cua--region-keymap [remap self-insert-iso]        'cua-replace-region)

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26