changeset 17325:c19c552c486f

(read1): Adjusted for the new structure of Lisp_Char_Table.
author Kenichi Handa <handa@m17n.org>
date Mon, 07 Apr 1997 07:12:13 +0000
parents ed53084a1655
children bd34aa57f3f5
files src/lread.c src/print.c
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Mon Apr 07 07:12:13 1997 +0000
+++ b/src/lread.c	Mon Apr 07 07:12:13 1997 +0000
@@ -1336,8 +1336,25 @@
 		  || 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 == '&')
--- a/src/print.c	Mon Apr 07 07:12:13 1997 +0000
+++ b/src/print.c	Mon Apr 07 07:12:13 1997 +0000
@@ -1258,6 +1258,8 @@
 		 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)