From 3701b5de07a2998b089ef9e4f65bebedbb554039 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 7 Apr 1997 07:12:13 +0000 Subject: [PATCH] (read1): Adjusted for the new structure of Lisp_Char_Table. --- src/lread.c | 17 +++++++++++++++++ src/print.c | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/lread.c b/src/lread.c index 882b09bf5a3..5b4cd3e748f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1336,8 +1336,25 @@ read1 (readcharfun, pch, first_in_list) || XVECTOR (tmp)->size > CHAR_TABLE_STANDARD_SLOTS + 10) error ("Invalid size char-table"); XSETCHAR_TABLE (tmp, XCHAR_TABLE (tmp)); + XCHAR_TABLE (tmp)->top = Qt; return tmp; } + else if (c == '^') + { + c = READCHAR; + if (c == '[') + { + Lisp_Object tmp; + tmp = read_vector (readcharfun); + if (XVECTOR (tmp)->size != SUB_CHAR_TABLE_STANDARD_SLOTS) + error ("Invalid size char-table"); + XSETCHAR_TABLE (tmp, XCHAR_TABLE (tmp)); + XCHAR_TABLE (tmp)->top = Qnil; + return tmp; + } + Fsignal (Qinvalid_read_syntax, + Fcons (make_string ("#^^", 3), Qnil)); + } Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#^", 2), Qnil)); } if (c == '&') diff --git a/src/print.c b/src/print.c index 57f6ffdf826..8a218e88105 100644 --- a/src/print.c +++ b/src/print.c @@ -1258,6 +1258,8 @@ print (obj, printcharfun, escapeflag) character slots. But we add #^ as a prefix. */ PRINTCHAR ('#'); PRINTCHAR ('^'); + if (SUB_CHAR_TABLE_P (obj)) + PRINTCHAR ('^'); size &= PSEUDOVECTOR_SIZE_MASK; } if (size & PSEUDOVECTOR_FLAG) -- 2.39.2