diff options
| -rw-r--r-- | lisp/emulation/cua-base.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index f7887575521..2c7d3ddf0b1 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -653,17 +653,19 @@ Repeating prefix key when region is active works as a single prefix key." | |||
| 653 | (defun cua--prefix-arg (arg) | 653 | (defun cua--prefix-arg (arg) |
| 654 | (setq cua--register | 654 | (setq cua--register |
| 655 | (and cua-enable-register-prefix | 655 | (and cua-enable-register-prefix |
| 656 | (integerp (this-command-keys)) | ||
| 657 | (cond ((eq cua-enable-register-prefix 'not-ctrl-u) | ||
| 658 | (not (= (aref (this-command-keys) 0) ?\C-u))) | ||
| 659 | ((eq cua-enable-register-prefix 'ctrl-u-only) | ||
| 660 | (= (aref (this-command-keys) 0) ?\C-u)) | ||
| 661 | (t t)) | ||
| 662 | (integerp arg) (>= arg 0) (< arg 10) | 656 | (integerp arg) (>= arg 0) (< arg 10) |
| 657 | (let* ((prefix (aref (this-command-keys) 0)) | ||
| 658 | (ctrl-u-prefix (and (integerp prefix) | ||
| 659 | (= prefix ?\C-u))))) | ||
| 660 | (cond | ||
| 661 | ((eq cua-enable-register-prefix 'not-ctrl-u) | ||
| 662 | (not ctrl-u-prefix)) | ||
| 663 | ((eq cua-enable-register-prefix 'ctrl-u-only) | ||
| 664 | ctrl-u-prefix) | ||
| 665 | (t t)) | ||
| 663 | (+ arg ?0))) | 666 | (+ arg ?0))) |
| 664 | (if cua--register nil arg)) | 667 | (if cua--register nil arg)) |
| 665 | 668 | ||
| 666 | |||
| 667 | ;;; Enhanced undo - restore rectangle selections | 669 | ;;; Enhanced undo - restore rectangle selections |
| 668 | 670 | ||
| 669 | (defun cua-undo (&optional arg) | 671 | (defun cua-undo (&optional arg) |