]> git.eshelyaron.com Git - emacs.git/commitdiff
(read1): Adjusted for the new structure of Lisp_Char_Table.
authorKenichi Handa <handa@m17n.org>
Mon, 7 Apr 1997 07:12:13 +0000 (07:12 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 7 Apr 1997 07:12:13 +0000 (07:12 +0000)
src/lread.c
src/print.c

index 882b09bf5a39dcdbee26ccb57cdaf49e8e31b05a..5b4cd3e748f9bf1abb8c715bfca22274e0690a81 100644 (file)
@@ -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 == '&')
index 57f6ffdf82654489728c49c303ba39ee053a6fcb..8a218e8810585100d0d417f3327022e3e97e744a 100644 (file)
@@ -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)