aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman1995-10-14 05:52:39 +0000
committerRichard M. Stallman1995-10-14 05:52:39 +0000
commit5ebaddf5f9483a1ed0db8ffd9bbb69689cb6067f (patch)
tree2e787cca3875156e16cad33a8fb8c99ab4a32fee /src/syntax.c
parent138df2ce478a963bf884c8aa22ad9f83047b76cb (diff)
downloademacs-5ebaddf5f9483a1ed0db8ffd9bbb69689cb6067f.tar.gz
emacs-5ebaddf5f9483a1ed0db8ffd9bbb69689cb6067f.zip
(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.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 709f8a93f67..1a74345ca0d 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -25,7 +25,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
25#include "buffer.h" 25#include "buffer.h"
26#include "syntax.h" 26#include "syntax.h"
27 27
28Lisp_Object Qsyntax_table_p; 28Lisp_Object Qsyntax_table_p, Qsyntax_table;
29 29
30static void scan_sexps_forward (); 30static void scan_sexps_forward ();
31static int char_quoted (); 31static int char_quoted ();
@@ -116,7 +116,8 @@ Currently, any char-table counts as a syntax table.")
116 (obj) 116 (obj)
117 Lisp_Object obj; 117 Lisp_Object obj;
118{ 118{
119 if (CHAR_TABLE_P (obj)) 119 if (CHAR_TABLE_P (obj)
120 && XCHAR_TABLE (obj)->purpose == Qsyntax_table)
120 return Qt; 121 return Qt;
121 return Qnil; 122 return Qnil;
122} 123}
@@ -1720,9 +1721,22 @@ init_syntax_once ()
1720 register int i; 1721 register int i;
1721 Lisp_Object temp; 1722 Lisp_Object temp;
1722 1723
1724 /* This has to be done here, before we call Fmake_char_table. */
1725 Qsyntax_table = intern ("syntax-table");
1726 staticpro (&Qsyntax_table);
1727
1728 /* Intern this now in case it isn't already done.
1729 Setting this variable twice is harmless.
1730 But don't staticpro it here--that is done in alloc.c. */
1731 Qchar_table_extra_slots = intern ("char-table-extra-slots");
1732
1733 /* Now we are ready to set up this property, so we can
1734 create syntax tables. */
1735 Fput (Qsyntax_table, Qchar_table_extra_slots, make_number (0));
1736
1723 temp = Fcons (make_number ((int) Swhitespace), Qnil); 1737 temp = Fcons (make_number ((int) Swhitespace), Qnil);
1724 1738
1725 Vstandard_syntax_table = Fmake_char_table (make_number (0), temp); 1739 Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp);
1726 1740
1727 temp = Fcons (make_number ((int) Sword), Qnil); 1741 temp = Fcons (make_number ((int) Sword), Qnil);
1728 for (i = 'a'; i <= 'z'; i++) 1742 for (i = 'a'; i <= 'z'; i++)