From: Dmitry Antipov Date: Thu, 16 Aug 2012 07:26:18 +0000 (+0400) Subject: Fix previous char table change. X-Git-Tag: emacs-24.2.90~646 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2751c80fd3127c572462a2de82c2206d71a4e43e;p=emacs.git Fix previous char table change. * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents. * chartab.c (optimize_sub_char_table): Likewise. --- diff --git a/src/ChangeLog b/src/ChangeLog index 663035077bd..3f2a46794a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-08-16 Dmitry Antipov + + 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 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228). diff --git a/src/chartab.c b/src/chartab.c index e79ff73c375..6d3f83499d8 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -693,15 +693,19 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) 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. */ diff --git a/src/lisp.h b/src/lisp.h index 42297bf0402..426bcb263fd 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -923,7 +923,7 @@ enum 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