changeset 19175:3d80c899a15d

(read-quoted-char): Fix handling of meta-chars.
author Richard M. Stallman <rms@gnu.org>
date Tue, 05 Aug 1997 20:51:55 +0000
parents 025060cd6a50
children d8eb24685152
files lisp/subr.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Tue Aug 05 20:15:34 1997 +0000
+++ b/lisp/subr.el	Tue Aug 05 20:51:55 1997 +0000
@@ -693,12 +693,16 @@
       ;; 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 @@
 	    (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.