emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109643: Fix previous char table chan


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109643: Fix previous char table change.
Date: Thu, 16 Aug 2012 11:26:18 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109643
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-08-16 11:26:18 +0400
message:
  Fix previous char table change.
  * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
  * chartab.c (optimize_sub_char_table): Likewise.
modified:
  src/ChangeLog
  src/chartab.c
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-16 06:57:48 +0000
+++ b/src/ChangeLog     2012-08-16 07:26:18 +0000
@@ -1,3 +1,9 @@
+2012-08-16  Dmitry Antipov  <address@hidden>
+
+       Fix previous char table change.
+       * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
+       * chartab.c (optimize_sub_char_table): Likewise.
+
 2012-08-16  Chong Yidong  <address@hidden>
 
        * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).

=== modified file 'src/chartab.c'
--- a/src/chartab.c     2012-08-16 03:13:44 +0000
+++ b/src/chartab.c     2012-08-16 07:26:18 +0000
@@ -693,15 +693,19 @@
 
   elt = XSUB_CHAR_TABLE (table)->contents[0];
   if (SUB_CHAR_TABLE_P (elt))
-    elt = XSUB_CHAR_TABLE (table)->contents[0]
-      = optimize_sub_char_table (elt, test);
+    {
+      elt = optimize_sub_char_table (elt, test);
+      sub_char_table_set_contents (table, 0, elt);
+    }
   optimizable = SUB_CHAR_TABLE_P (elt) ? 0 : 1;
   for (i = 1; i < chartab_size[depth]; i++)
     {
       this = XSUB_CHAR_TABLE (table)->contents[i];
       if (SUB_CHAR_TABLE_P (this))
-       this = XSUB_CHAR_TABLE (table)->contents[i]
-         = optimize_sub_char_table (this, test);
+       {
+         this = optimize_sub_char_table (this, test);
+         sub_char_table_set_contents (table, i, this);
+       }
       if (optimizable
          && (NILP (test) ? NILP (Fequal (this, elt)) /* defaults to `equal'. */
              : EQ (test, Qeq) ? !EQ (this, elt)      /* Optimize `eq' case.  */

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-08-16 03:13:44 +0000
+++ b/src/lisp.h        2012-08-16 07:26:18 +0000
@@ -923,7 +923,7 @@
    8-bit European characters.  Do not check validity of CT.  */
 #define CHAR_TABLE_SET(CT, IDX, VAL)                                   \
   (ASCII_CHAR_P (IDX) && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii)    \
-   ? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX] = VAL    \
+   ? sub_char_table_set_contents (XCHAR_TABLE (CT)->ascii, IDX, VAL)   \
    : char_table_set (CT, IDX, VAL))
 
 enum CHARTAB_SIZE_BITS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]