From: Richard M. Stallman Date: Tue, 5 Aug 1997 20:51:55 +0000 (+0000) Subject: (read-quoted-char): Fix handling of meta-chars. X-Git-Tag: emacs-20.1~771 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf896a1b80d62bd67b79e8612c0600b93e77abbd;p=emacs.git (read-quoted-char): Fix handling of meta-chars. --- 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.