Mercurial > hg > xemacs-beta
comparison src/text.c @ 5863:15041705c196
Provide `char-code-limit', implement the GNU equivalent in terms of it.
src/ChangeLog addition:
2015-03-15 Aidan Kehoe <kehoea@parhasard.net>
* text.h: Make CHAR_CODE_LIMIT available as a #define.
* text.h (valid_ichar_p): Use it.
* text.c: Make a fixnum Vchar_code_limit available here.
* text.c (non_ascii_valid_ichar_p): Use CHAR_CODE_LIMIT.
* text.c (vars_of_text): Make `char-code-limit' available to
Lisp.
tests/ChangeLog addition:
2015-03-15 Aidan Kehoe <kehoea@parhasard.net>
* automated/mule-tests.el (test-chars):
Use char-code-limit explicitly here, instead of hardcoding the
corresponding values.
lisp/ChangeLog addition:
2015-03-16 Aidan Kehoe <kehoea@parhasard.net>
* obsolete.el (max-char):
Make this available for compatiblity with GNU, implement it in
terms of char-code-limit.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 16 Mar 2015 00:09:46 +0000 |
parents | 7343a186a475 |
children |
comparison
equal
deleted
inserted
replaced
5862:5b799fa6d75e | 5863:15041705c196 |
---|---|
1320 #endif /* MULE */ | 1320 #endif /* MULE */ |
1321 | 1321 |
1322 Lisp_Object QSin_char_byte_conversion; | 1322 Lisp_Object QSin_char_byte_conversion; |
1323 Lisp_Object QSin_internal_external_conversion; | 1323 Lisp_Object QSin_internal_external_conversion; |
1324 | 1324 |
1325 Fixnum Vchar_code_limit; | |
1325 | 1326 |
1326 /************************************************************************/ | 1327 /************************************************************************/ |
1327 /* qxestr***() functions */ | 1328 /* qxestr***() functions */ |
1328 /************************************************************************/ | 1329 /************************************************************************/ |
1329 | 1330 |
4675 non_ascii_valid_ichar_p (Ichar ch) | 4676 non_ascii_valid_ichar_p (Ichar ch) |
4676 { | 4677 { |
4677 int f1, f2, f3; | 4678 int f1, f2, f3; |
4678 | 4679 |
4679 /* Must have only lowest 21 bits set */ | 4680 /* Must have only lowest 21 bits set */ |
4680 if (ch & ~0x1FFFFF) | 4681 if (ch & ~(CHAR_CODE_LIMIT - 1)) |
4681 return 0; | 4682 return 0; |
4682 | 4683 |
4683 f1 = ichar_field1 (ch); | 4684 f1 = ichar_field1 (ch); |
4684 f2 = ichar_field2 (ch); | 4685 f2 = ichar_field2 (ch); |
4685 f3 = ichar_field3 (ch); | 4686 f3 = ichar_field3 (ch); |
5141 staticpro (&QSin_char_byte_conversion); | 5142 staticpro (&QSin_char_byte_conversion); |
5142 QSin_internal_external_conversion = | 5143 QSin_internal_external_conversion = |
5143 build_defer_string ("(in internal-external conversion)"); | 5144 build_defer_string ("(in internal-external conversion)"); |
5144 staticpro (&QSin_internal_external_conversion); | 5145 staticpro (&QSin_internal_external_conversion); |
5145 | 5146 |
5147 DEFVAR_CONST_INT ("char-code-limit", &Vchar_code_limit /* | |
5148 Exclusive upper bound on the values return by `char-int'. | |
5149 | |
5150 Note that not every fixnum with a value below `char-code-limit' has an | |
5151 associated character; check with `char-int-p' if necessary. | |
5152 */); | |
5153 Vchar_code_limit = CHAR_CODE_LIMIT; | |
5154 | |
5146 #ifdef ENABLE_COMPOSITE_CHARS | 5155 #ifdef ENABLE_COMPOSITE_CHARS |
5147 /* #### not dumped properly */ | 5156 /* #### not dumped properly */ |
5148 composite_char_row_next = 32; | 5157 composite_char_row_next = 32; |
5149 composite_char_col_next = 32; | 5158 composite_char_col_next = 32; |
5150 | 5159 |