From 1c62c12fbf9ffd25acbe44cb451b8de3fb675c09 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 21 Jun 2002 13:51:05 +0000 Subject: [PATCH] (cua--prefix-arg): Make register prefixes work again. Corrected error in check for C-u initiated prefix. --- lisp/emulation/cua-base.el | 16 +++++++++------- 1 file 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." (defun cua--prefix-arg (arg) (setq cua--register (and cua-enable-register-prefix - (integerp (this-command-keys)) - (cond ((eq cua-enable-register-prefix 'not-ctrl-u) - (not (= (aref (this-command-keys) 0) ?\C-u))) - ((eq cua-enable-register-prefix 'ctrl-u-only) - (= (aref (this-command-keys) 0) ?\C-u)) - (t t)) (integerp arg) (>= arg 0) (< arg 10) + (let* ((prefix (aref (this-command-keys) 0)) + (ctrl-u-prefix (and (integerp prefix) + (= prefix ?\C-u))))) + (cond + ((eq cua-enable-register-prefix 'not-ctrl-u) + (not ctrl-u-prefix)) + ((eq cua-enable-register-prefix 'ctrl-u-only) + ctrl-u-prefix) + (t t)) (+ arg ?0))) (if cua--register nil arg)) - ;;; Enhanced undo - restore rectangle selections (defun cua-undo (&optional arg) -- 2.39.2