From: Richard M. Stallman Date: Sat, 24 Feb 1996 20:03:07 +0000 (+0000) Subject: (Fcopy_syntax_table): Set default to nil. X-Git-Tag: emacs-19.34~1199 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f86732408ad765d574befb3f0a0ea69dbb92a83;p=emacs.git (Fcopy_syntax_table): Set default to nil. Set the parent only if it was nil. --- 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.") 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; }