aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/subr.el40
1 files changed, 20 insertions, 20 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 16bd3a91763..0d3c9ea2497 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1104,7 +1104,7 @@ any other terminator is used itself as input.
1104The optional argument PROMPT specifies a string to use to prompt the user. 1104The optional argument PROMPT specifies a string to use to prompt the user.
1105The variable `read-quoted-char-radix' controls which radix to use 1105The variable `read-quoted-char-radix' controls which radix to use
1106for numeric input." 1106for numeric input."
1107 (let ((message-log-max nil) done (first t) (code 0) char) 1107 (let ((message-log-max nil) done (first t) (code 0) char translated)
1108 (while (not done) 1108 (while (not done)
1109 (let ((inhibit-quit first) 1109 (let ((inhibit-quit first)
1110 ;; Don't let C-h get the help message--only help function keys. 1110 ;; Don't let C-h get the help message--only help function keys.
@@ -1121,32 +1121,32 @@ any other non-digit terminates the character code and is then used as input."))
1121 ;; We could try and use read-key-sequence instead, but then C-q ESC 1121 ;; We could try and use read-key-sequence instead, but then C-q ESC
1122 ;; or C-q C-x might not return immediately since ESC or C-x might be 1122 ;; or C-q C-x might not return immediately since ESC or C-x might be
1123 ;; bound to some prefix in function-key-map or key-translation-map. 1123 ;; bound to some prefix in function-key-map or key-translation-map.
1124 (and char 1124 (setq translated char)
1125 (let ((translated (lookup-key function-key-map (vector char)))) 1125 (let ((translation (lookup-key function-key-map (vector char))))
1126 (if (arrayp translated) 1126 (if (arrayp translation)
1127 (setq char (aref translated 0))))) 1127 (setq translated (aref translation 0))))
1128 (cond ((null char)) 1128 (cond ((null translated))
1129 ((not (integerp char)) 1129 ((not (integerp translated))
1130 (setq unread-command-events (listify-key-sequence (this-single-command-raw-keys)) 1130 (setq unread-command-events (list char)
1131 done t)) 1131 done t))
1132 ((/= (logand char ?\M-\^@) 0) 1132 ((/= (logand translated ?\M-\^@) 0)
1133 ;; Turn a meta-character into a character with the 0200 bit set. 1133 ;; Turn a meta-character into a character with the 0200 bit set.
1134 (setq code (logior (logand char (lognot ?\M-\^@)) 128) 1134 (setq code (logior (logand translated (lognot ?\M-\^@)) 128)
1135 done t)) 1135 done t))
1136 ((and (<= ?0 char) (< char (+ ?0 (min 10 read-quoted-char-radix)))) 1136 ((and (<= ?0 translated) (< translated (+ ?0 (min 10 read-quoted-char-radix))))
1137 (setq code (+ (* code read-quoted-char-radix) (- char ?0))) 1137 (setq code (+ (* code read-quoted-char-radix) (- translated ?0)))
1138 (and prompt (setq prompt (message "%s %c" prompt char)))) 1138 (and prompt (setq prompt (message "%s %c" prompt translated))))
1139 ((and (<= ?a (downcase char)) 1139 ((and (<= ?a (downcase translated))
1140 (< (downcase char) (+ ?a -10 (min 26 read-quoted-char-radix)))) 1140 (< (downcase translated) (+ ?a -10 (min 26 read-quoted-char-radix))))
1141 (setq code (+ (* code read-quoted-char-radix) 1141 (setq code (+ (* code read-quoted-char-radix)
1142 (+ 10 (- (downcase char) ?a)))) 1142 (+ 10 (- (downcase translated) ?a))))
1143 (and prompt (setq prompt (message "%s %c" prompt char)))) 1143 (and prompt (setq prompt (message "%s %c" prompt translated))))
1144 ((and (not first) (eq char ?\C-m)) 1144 ((and (not first) (eq translated ?\C-m))
1145 (setq done t)) 1145 (setq done t))
1146 ((not first) 1146 ((not first)
1147 (setq unread-command-events (listify-key-sequence (this-single-command-raw-keys)) 1147 (setq unread-command-events (list char)
1148 done t)) 1148 done t))
1149 (t (setq code char 1149 (t (setq code translated
1150 done t))) 1150 done t)))
1151 (setq first nil)) 1151 (setq first nil))
1152 code)) 1152 code))