[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el |
Date: |
Thu, 08 Dec 2005 09:12:13 -0500 |
Index: emacs/lisp/emulation/cua-base.el
diff -c emacs/lisp/emulation/cua-base.el:1.63
emacs/lisp/emulation/cua-base.el:1.64
*** emacs/lisp/emulation/cua-base.el:1.63 Fri Oct 7 12:43:56 2005
--- emacs/lisp/emulation/cua-base.el Thu Dec 8 14:12:12 2005
***************
*** 1232,1238 ****
(not cua--prefix-override-timer)))
(setq cua--ena-prefix-repeat-keymap
(and cua--ena-region-keymap
! (timerp cua--prefix-override-timer)))
(setq cua--ena-cua-keys-keymap
(and cua-enable-cua-keys
(not cua-inhibit-cua-keys)
--- 1232,1239 ----
(not cua--prefix-override-timer)))
(setq cua--ena-prefix-repeat-keymap
(and cua--ena-region-keymap
! (or (timerp cua--prefix-override-timer)
! (eq cua--prefix-override-timer 'shift))))
(setq cua--ena-cua-keys-keymap
(and cua-enable-cua-keys
(not cua-inhibit-cua-keys)
***************
*** 1244,1249 ****
--- 1245,1270 ----
(defvar cua--keymaps-initalized nil)
+ (defun cua--shift-control-prefix (prefix arg)
+ ;; handle S-C-x and S-C-c by emulating the fast double prefix function.
+ ;; Don't record this command
+ (setq this-command last-command)
+ ;; Restore the prefix arg
+ (setq prefix-arg arg)
+ (reset-this-command-lengths)
+ ;; Activate the cua--prefix-repeat-keymap
+ (setq cua--prefix-override-timer 'shift)
+ ;; Push duplicate keys back on the event queue
+ (setq unread-command-events (cons prefix (cons prefix
unread-command-events))))
+
+ (defun cua--shift-control-c-prefix (arg)
+ (interactive "P")
+ (cua--shift-control-prefix ?\C-c arg))
+
+ (defun cua--shift-control-x-prefix (arg)
+ (interactive "P")
+ (cua--shift-control-prefix ?\C-x arg))
+
(defun cua--init-keymaps ()
(unless (eq cua-use-hyper-key 'only)
(define-key cua-global-keymap [(control return)]
'cua-set-rectangle-mark))
***************
*** 1287,1294 ****
(define-key cua--prefix-repeat-keymap [(control c) right]
'cua--prefix-copy-handler)
;; Enable shifted fallbacks for C-x and C-c when region is active
! (define-key cua--region-keymap [(shift control x)] 'Control-X-prefix)
! (define-key cua--region-keymap [(shift control c)]
'mode-specific-command-prefix)
;; replace current region
(define-key cua--region-keymap [remap self-insert-command]
'cua-replace-region)
(define-key cua--region-keymap [remap self-insert-iso]
'cua-replace-region)
--- 1308,1316 ----
(define-key cua--prefix-repeat-keymap [(control c) right]
'cua--prefix-copy-handler)
;; Enable shifted fallbacks for C-x and C-c when region is active
! (define-key cua--region-keymap [(shift control x)]
'cua--shift-control-x-prefix)
! (define-key cua--region-keymap [(shift control c)]
'cua--shift-control-c-prefix)
!
;; replace current region
(define-key cua--region-keymap [remap self-insert-command]
'cua-replace-region)
(define-key cua--region-keymap [remap self-insert-iso]
'cua-replace-region)
- [Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el,
Kim F . Storm <=