# HG changeset patch # User Richard M. Stallman # Date 813649959 0 # Node ID d2fc560c77408702f647bf94e3f8cff462c936a4 # Parent c3f879af05db064f006e6fa3158ff8531bddbbe6 (Qsyntax_table): New variable. (init_syntax_once): Call Fmake_char_table the new way. Set up Qsyntax_table. (Fsyntax_table_p): Check the `purpose' field. diff -r c3f879af05db -r d2fc560c7740 src/syntax.c --- a/src/syntax.c Sat Oct 14 03:14:39 1995 +0000 +++ b/src/syntax.c Sat Oct 14 05:52:39 1995 +0000 @@ -25,7 +25,7 @@ #include "buffer.h" #include "syntax.h" -Lisp_Object Qsyntax_table_p; +Lisp_Object Qsyntax_table_p, Qsyntax_table; static void scan_sexps_forward (); static int char_quoted (); @@ -116,7 +116,8 @@ (obj) Lisp_Object obj; { - if (CHAR_TABLE_P (obj)) + if (CHAR_TABLE_P (obj) + && XCHAR_TABLE (obj)->purpose == Qsyntax_table) return Qt; return Qnil; } @@ -1720,9 +1721,22 @@ register int i; Lisp_Object temp; + /* This has to be done here, before we call Fmake_char_table. */ + Qsyntax_table = intern ("syntax-table"); + staticpro (&Qsyntax_table); + + /* Intern this now in case it isn't already done. + Setting this variable twice is harmless. + But don't staticpro it here--that is done in alloc.c. */ + Qchar_table_extra_slots = intern ("char-table-extra-slots"); + + /* Now we are ready to set up this property, so we can + create syntax tables. */ + Fput (Qsyntax_table, Qchar_table_extra_slots, make_number (0)); + temp = Fcons (make_number ((int) Swhitespace), Qnil); - Vstandard_syntax_table = Fmake_char_table (make_number (0), temp); + Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp); temp = Fcons (make_number ((int) Sword), Qnil); for (i = 'a'; i <= 'z'; i++)