diff options
author | Kenichi Handa <handa@m17n.org> | 2002-06-12 00:12:34 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2002-06-12 00:12:34 +0000 |
commit | d8887a31dd12c18d0fb545f04d02e282e44ba642 (patch) | |
tree | 0ae199341df9680070a26d41f7c7e606e5133e8f /src/category.c | |
parent | af301c44e78e9281c3026818039df1384d5c605c (diff) | |
download | emacs-d8887a31dd12c18d0fb545f04d02e282e44ba642.tar.gz |
(Fmodify_category_entry): Don't modify the contents
of category_set for characters out of the range. Avoid
unnecessary modification.
Diffstat (limited to 'src/category.c')
-rw-r--r-- | src/category.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/category.c b/src/category.c index e6c180f29c1..4e89c98a027 100644 --- a/src/category.c +++ b/src/category.c @@ -364,18 +364,15 @@ then delete CATEGORY from the category set instead of adding it. */) while (start <= end) { category_set = char_table_ref_and_range (table, start, &from, &to); - if (from < start || to > end) - category_set = Fcopy_sequence (category_set); - SET_CATEGORY_SET (category_set, category, set_value); - if (from < start) + if (CATEGORY_MEMBER (category, category_set) != NILP (reset)) { + category_set = Fcopy_sequence (category_set); + SET_CATEGORY_SET (category_set, category, set_value); if (to > end) char_table_set_range (table, start, end, category_set); else char_table_set_range (table, start, to, category_set); } - else if (to > end) - char_table_set_range (table, start, end, category_set); start = to + 1; } return Qnil; |