diff options
| author | Dmitry Antipov | 2012-08-16 11:26:18 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-16 11:26:18 +0400 |
| commit | 2751c80fd3127c572462a2de82c2206d71a4e43e (patch) | |
| tree | 7a8f2f9d0c9c03169c24a7305849055d3b0286a5 /src | |
| parent | a2d1936838348d0a29e4a64f545180276f30cb99 (diff) | |
| download | emacs-2751c80fd3127c572462a2de82c2206d71a4e43e.tar.gz emacs-2751c80fd3127c572462a2de82c2206d71a4e43e.zip | |
Fix previous char table change.
* lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
* chartab.c (optimize_sub_char_table): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/chartab.c | 12 | ||||
| -rw-r--r-- | src/lisp.h | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 663035077bd..3f2a46794a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | Fix previous char table change. | ||
| 4 | * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents. | ||
| 5 | * chartab.c (optimize_sub_char_table): Likewise. | ||
| 6 | |||
| 1 | 2012-08-16 Chong Yidong <cyd@gnu.org> | 7 | 2012-08-16 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228). | 9 | * 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) | |||
| 693 | 693 | ||
| 694 | elt = XSUB_CHAR_TABLE (table)->contents[0]; | 694 | elt = XSUB_CHAR_TABLE (table)->contents[0]; |
| 695 | if (SUB_CHAR_TABLE_P (elt)) | 695 | if (SUB_CHAR_TABLE_P (elt)) |
| 696 | elt = XSUB_CHAR_TABLE (table)->contents[0] | 696 | { |
| 697 | = optimize_sub_char_table (elt, test); | 697 | elt = optimize_sub_char_table (elt, test); |
| 698 | sub_char_table_set_contents (table, 0, elt); | ||
| 699 | } | ||
| 698 | optimizable = SUB_CHAR_TABLE_P (elt) ? 0 : 1; | 700 | optimizable = SUB_CHAR_TABLE_P (elt) ? 0 : 1; |
| 699 | for (i = 1; i < chartab_size[depth]; i++) | 701 | for (i = 1; i < chartab_size[depth]; i++) |
| 700 | { | 702 | { |
| 701 | this = XSUB_CHAR_TABLE (table)->contents[i]; | 703 | this = XSUB_CHAR_TABLE (table)->contents[i]; |
| 702 | if (SUB_CHAR_TABLE_P (this)) | 704 | if (SUB_CHAR_TABLE_P (this)) |
| 703 | this = XSUB_CHAR_TABLE (table)->contents[i] | 705 | { |
| 704 | = optimize_sub_char_table (this, test); | 706 | this = optimize_sub_char_table (this, test); |
| 707 | sub_char_table_set_contents (table, i, this); | ||
| 708 | } | ||
| 705 | if (optimizable | 709 | if (optimizable |
| 706 | && (NILP (test) ? NILP (Fequal (this, elt)) /* defaults to `equal'. */ | 710 | && (NILP (test) ? NILP (Fequal (this, elt)) /* defaults to `equal'. */ |
| 707 | : EQ (test, Qeq) ? !EQ (this, elt) /* Optimize `eq' case. */ | 711 | : 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 | |||
| 923 | 8-bit European characters. Do not check validity of CT. */ | 923 | 8-bit European characters. Do not check validity of CT. */ |
| 924 | #define CHAR_TABLE_SET(CT, IDX, VAL) \ | 924 | #define CHAR_TABLE_SET(CT, IDX, VAL) \ |
| 925 | (ASCII_CHAR_P (IDX) && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \ | 925 | (ASCII_CHAR_P (IDX) && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \ |
| 926 | ? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX] = VAL \ | 926 | ? sub_char_table_set_contents (XCHAR_TABLE (CT)->ascii, IDX, VAL) \ |
| 927 | : char_table_set (CT, IDX, VAL)) | 927 | : char_table_set (CT, IDX, VAL)) |
| 928 | 928 | ||
| 929 | enum CHARTAB_SIZE_BITS | 929 | enum CHARTAB_SIZE_BITS |