Mercurial > emacs
comparison src/category.c @ 88741:a93a8b796b91
(Fmodify_category_entry): Don't modify the contents
of category_set for characters out of the range. Avoid
unnecessary modification.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 12 Jun 2002 00:12:34 +0000 |
parents | 6bd578d2b8af |
children | 6f9164905a7c |
comparison
equal
deleted
inserted
replaced
88740:62f922836c9b | 88741:a93a8b796b91 |
---|---|
362 set_value = NILP (reset) ? Qt : Qnil; | 362 set_value = NILP (reset) ? Qt : Qnil; |
363 | 363 |
364 while (start <= end) | 364 while (start <= end) |
365 { | 365 { |
366 category_set = char_table_ref_and_range (table, start, &from, &to); | 366 category_set = char_table_ref_and_range (table, start, &from, &to); |
367 if (from < start || to > end) | 367 if (CATEGORY_MEMBER (category, category_set) != NILP (reset)) |
368 category_set = Fcopy_sequence (category_set); | |
369 SET_CATEGORY_SET (category_set, category, set_value); | |
370 if (from < start) | |
371 { | 368 { |
369 category_set = Fcopy_sequence (category_set); | |
370 SET_CATEGORY_SET (category_set, category, set_value); | |
372 if (to > end) | 371 if (to > end) |
373 char_table_set_range (table, start, end, category_set); | 372 char_table_set_range (table, start, end, category_set); |
374 else | 373 else |
375 char_table_set_range (table, start, to, category_set); | 374 char_table_set_range (table, start, to, category_set); |
376 } | 375 } |
377 else if (to > end) | |
378 char_table_set_range (table, start, end, category_set); | |
379 start = to + 1; | 376 start = to + 1; |
380 } | 377 } |
381 return Qnil; | 378 return Qnil; |
382 } | 379 } |
383 | 380 |