summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-04-07 07:12:13 +0000
committerKenichi Handa <handa@m17n.org>1997-04-07 07:12:13 +0000
commit9fd7b6d566a0c35a8b6a4bf434743da062770edb (patch)
tree9e69c8b4d091f915a3092fed5a0c85eb071f2bee
parentd77a501531d05f0be6a2ec5d076671c5a4e39841 (diff)
downloademacs-9fd7b6d566a0c35a8b6a4bf434743da062770edb.tar.gz
(read1): Adjusted for the new structure of Lisp_Char_Table.
-rw-r--r--src/lread.c17
-rw-r--r--src/print.c2
2 files changed, 19 insertions, 0 deletions
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)