changeset 3879:f73b455b1472

[xemacs-hg @ 2007-03-25 15:34:59 by stephent] Olivier's fix for syntax tables. <20070324221053.GA48218@dspnet.fr.eu.org>
author stephent
date Sun, 25 Mar 2007 15:35:06 +0000
parents 91cb5170601e
children 4035bd42c75e
files src/ChangeLog src/chartab.c
diffstat 2 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Mar 24 22:51:16 2007 +0000
+++ b/src/ChangeLog	Sun Mar 25 15:35:06 2007 +0000
@@ -1,3 +1,9 @@
+2007-03-24  Olivier Galibert  <galibert@pobox.com>
+
+	* chartab.c (Fcopy_char_table): Simplify the mirror table
+	handling: never copy a mirror table, just make a new one and mark
+	it dirty.  Fixes http://article.gmane.org/gmane.emacs.xemacs.beta/17353
+
 2007-01-22  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* eval.c (quote):
--- a/src/chartab.c	Sat Mar 24 22:51:16 2007 +0000
+++ b/src/chartab.c	Sun Mar 25 15:35:06 2007 +0000
@@ -668,11 +668,12 @@
 
   CHECK_CHAR_TABLE (char_table);
   ct = XCHAR_TABLE (char_table);
+  assert(!ct->mirror_table_p);
   ctnew = ALLOC_LCRECORD_TYPE (Lisp_Char_Table, &lrecord_char_table);
   ctnew->type = ct->type;
   ctnew->parent = ct->parent;
   ctnew->default_ = ct->default_;
-  ctnew->mirror_table_p = ct->mirror_table_p;
+  ctnew->mirror_table_p = 0;
   obj = wrap_char_table (ctnew);
 
   for (i = 0; i < NUM_ASCII_CHARS; i++)
@@ -697,13 +698,17 @@
 
 #endif /* MULE */
 
-  if (!ct->mirror_table_p && CHAR_TABLEP (ct->mirror_table))
+  if (ct->mirror_table != Qnil)
     {
-      ctnew->mirror_table = Fcopy_char_table (ct->mirror_table);
+      ctnew->mirror_table = Fmake_char_table (Qgeneric);
+      set_char_table_default (ctnew->mirror_table, make_int (Sword));
       XCHAR_TABLE (ctnew->mirror_table)->mirror_table = obj;
+      XCHAR_TABLE (ctnew->mirror_table)->mirror_table_p = 1;
+      XCHAR_TABLE (ctnew->mirror_table)->dirty = 1;
     }
   else
-    ctnew->mirror_table = ct->mirror_table;
+    ctnew->mirror_table = Qnil;
+
   ctnew->next_table = Qnil;
   if (ctnew->type == CHAR_TABLE_TYPE_SYNTAX)
     {