aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/syntax.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/syntax.c b/src/syntax.c
index f21b592fd3e..8c08aa56a10 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -163,7 +163,16 @@ It is a copy of the TABLE, which defaults to the standard syntax table.")
163 table = Vstandard_syntax_table; 163 table = Vstandard_syntax_table;
164 164
165 copy = Fcopy_sequence (table); 165 copy = Fcopy_sequence (table);
166 Fset_char_table_parent (copy, Vstandard_syntax_table); 166
167 /* Only the standard syntax table should have a default element.
168 Other syntax tables should inherit from parents instead. */
169 XCHAR_TABLE (copy)->defalt = Qnil;
170
171 /* Copied syntax tables should all have parents.
172 If we copied one with no parent, such as the standard syntax table,
173 use the standard syntax table as the copy's parent. */
174 if (NILP (XCHAR_TABLE (copy)->parent))
175 Fset_char_table_parent (copy, Vstandard_syntax_table);
167 return copy; 176 return copy;
168} 177}
169 178