From bf896a1b80d62bd67b79e8612c0600b93e77abbd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 5 Aug 1997 20:51:55 +0000 Subject: [PATCH] (read-quoted-char): Fix handling of meta-chars. --- lisp/subr.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 53c4b2716b3..1e894742cdd 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -693,12 +693,16 @@ any other non-digit terminates the character code and is then used as input.")) ;; Translate TAB key into control-I ASCII character, and so on. (and char (let ((translated (lookup-key function-key-map (vector char)))) - (if translated + (if (arrayp translated) (setq char (aref translated 0))))) (cond ((null char)) ((not (integerp char)) (setq unread-command-events (list char) done t)) + ((/= (logand char ?\M-\^@) 0) + ;; Turn a meta-character into a character with the 0200 bit set. + (setq code (logior (logand char (lognot ?\M-\^@)) 128) + done t)) ((and (<= ?0 char) (< char (+ ?0 (min 10 read-quoted-char-radix)))) (setq code (+ (* code read-quoted-char-radix) (- char ?0))) (and prompt (setq prompt (message "%s %c" prompt char)))) @@ -715,9 +719,7 @@ any other non-digit terminates the character code and is then used as input.")) (t (setq code char done t))) (setq first nil)) - ;; Turn a meta-character into a character with the 0200 bit set. - (logior (if (/= (logand code ?\M-\^@) 0) 128 0) - code))) + code)) (defun force-mode-line-update (&optional all) "Force the mode-line of the current buffer to be redisplayed. -- 2.39.2