aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman1996-02-24 20:03:07 +0000
committerRichard M. Stallman1996-02-24 20:03:07 +0000
commit0f86732408ad765d574befb3f0a0ea69dbb92a83 (patch)
tree570bbee238613155d39a603480c24fa3838464d5 /src/syntax.c
parent3efb840dd47b58410e9c9e580b5831a6d5e54fbb (diff)
downloademacs-0f86732408ad765d574befb3f0a0ea69dbb92a83.tar.gz
emacs-0f86732408ad765d574befb3f0a0ea69dbb92a83.zip
(Fcopy_syntax_table): Set default to nil.
Set the parent only if it was nil.
Diffstat (limited to 'src/syntax.c')
-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