From 0f86732408ad765d574befb3f0a0ea69dbb92a83 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 24 Feb 1996 20:03:07 +0000 Subject: [PATCH] (Fcopy_syntax_table): Set default to nil. Set the parent only if it was nil. --- src/syntax.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; } -- 2.39.5