aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-05 20:51:55 +0000
committerRichard M. Stallman1997-08-05 20:51:55 +0000
commitbf896a1b80d62bd67b79e8612c0600b93e77abbd (patch)
treee9b86073fa853b902d05e76a0a66ad5fe19e6dfb
parentc404182949f1dc00e8ddd7e3ca89426032dbc1cd (diff)
downloademacs-bf896a1b80d62bd67b79e8612c0600b93e77abbd.tar.gz
emacs-bf896a1b80d62bd67b79e8612c0600b93e77abbd.zip
(read-quoted-char): Fix handling of meta-chars.
-rw-r--r--lisp/subr.el10
1 files 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."))
693 ;; Translate TAB key into control-I ASCII character, and so on. 693 ;; Translate TAB key into control-I ASCII character, and so on.
694 (and char 694 (and char
695 (let ((translated (lookup-key function-key-map (vector char)))) 695 (let ((translated (lookup-key function-key-map (vector char))))
696 (if translated 696 (if (arrayp translated)
697 (setq char (aref translated 0))))) 697 (setq char (aref translated 0)))))
698 (cond ((null char)) 698 (cond ((null char))
699 ((not (integerp char)) 699 ((not (integerp char))
700 (setq unread-command-events (list char) 700 (setq unread-command-events (list char)
701 done t)) 701 done t))
702 ((/= (logand char ?\M-\^@) 0)
703 ;; Turn a meta-character into a character with the 0200 bit set.
704 (setq code (logior (logand char (lognot ?\M-\^@)) 128)
705 done t))
702 ((and (<= ?0 char) (< char (+ ?0 (min 10 read-quoted-char-radix)))) 706 ((and (<= ?0 char) (< char (+ ?0 (min 10 read-quoted-char-radix))))
703 (setq code (+ (* code read-quoted-char-radix) (- char ?0))) 707 (setq code (+ (* code read-quoted-char-radix) (- char ?0)))
704 (and prompt (setq prompt (message "%s %c" prompt char)))) 708 (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."))
715 (t (setq code char 719 (t (setq code char
716 done t))) 720 done t)))
717 (setq first nil)) 721 (setq first nil))
718 ;; Turn a meta-character into a character with the 0200 bit set. 722 code))
719 (logior (if (/= (logand code ?\M-\^@) 0) 128 0)
720 code)))
721 723
722(defun force-mode-line-update (&optional all) 724(defun force-mode-line-update (&optional all)
723 "Force the mode-line of the current buffer to be redisplayed. 725 "Force the mode-line of the current buffer to be redisplayed.