diff options
author | Kenichi Handa <handa@m17n.org> | 2006-09-22 12:54:38 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2006-09-22 12:54:38 +0000 |
commit | 983f6a3da6987ede8d4166cbd5061a2a1235d80a (patch) | |
tree | 421ca80ef2923282c300141f50c00492a6f84848 /src/fns.c | |
parent | 7b7d4a7915edf6aabe29e0e0045439b3d8086337 (diff) | |
download | emacs-983f6a3da6987ede8d4166cbd5061a2a1235d80a.tar.gz |
(optimize_sub_char_table): Don't optimize a sub-char-table
whose default value is non-nil.
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fns.c b/src/fns.c index e769f40cc88..ff945720f4f 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2777,7 +2777,8 @@ optimize_sub_char_table (table, chars) else from = 32, to = 128; - if (!SUB_CHAR_TABLE_P (*table)) + if (!SUB_CHAR_TABLE_P (*table) + || ! NILP (XCHAR_TABLE (*table)->defalt)) return; elt = XCHAR_TABLE (*table)->contents[from++]; for (; from < to; from++) @@ -2792,7 +2793,7 @@ DEFUN ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, Lisp_Object table; { Lisp_Object elt; - int dim; + int dim, chars; int i, j; CHECK_CHAR_TABLE (table); @@ -2803,10 +2804,11 @@ DEFUN ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, if (!SUB_CHAR_TABLE_P (elt)) continue; dim = CHARSET_DIMENSION (i - 128); + chars = CHARSET_CHARS (i - 128); if (dim == 2) for (j = 32; j < SUB_CHAR_TABLE_ORDINARY_SLOTS; j++) - optimize_sub_char_table (XCHAR_TABLE (elt)->contents + j, dim); - optimize_sub_char_table (XCHAR_TABLE (table)->contents + i, dim); + optimize_sub_char_table (XCHAR_TABLE (elt)->contents + j, chars); + optimize_sub_char_table (XCHAR_TABLE (table)->contents + i, chars); } return Qnil; } |