Mercurial > emacs
diff src/syntax.c @ 14661:46ba65e7976c
(Fcopy_syntax_table): Set default to nil.
Set the parent only if it was nil.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sat, 24 Feb 1996 20:03:07 +0000 |
| parents | ee40177f6c68 |
| children | 855c8d8ba0f0 |
line wrap: on
line diff
--- a/src/syntax.c Sat Feb 24 10:15:08 1996 +0000 +++ b/src/syntax.c Sat Feb 24 20:03:07 1996 +0000 @@ -163,7 +163,16 @@ table = Vstandard_syntax_table; copy = Fcopy_sequence (table); - Fset_char_table_parent (copy, Vstandard_syntax_table); + + /* Only the standard syntax table should have a default element. + Other syntax tables should inherit from parents instead. */ + XCHAR_TABLE (copy)->defalt = Qnil; + + /* Copied syntax tables should all have parents. + If we copied one with no parent, such as the standard syntax table, + use the standard syntax table as the copy's parent. */ + if (NILP (XCHAR_TABLE (copy)->parent)) + Fset_char_table_parent (copy, Vstandard_syntax_table); return copy; }
