/* `(space ...)' display specs are handled as paragraph
separators for the purposes of the reordering; see UAX#9
section 3 and clause HL1 in section 4.3 there. */
- ch = 0x2029;
+ ch = PARAGRAPH_SEPARATOR;
}
else
{
/* All other display specs are handled as the Unicode Object
Replacement Character. */
- ch = 0xFFFC;
+ ch = OBJECT_REPLACEMENT_CHARACTER;
}
disp_end_pos = compute_display_string_end (*disp_pos, string);
if (disp_end_pos < 0)
#define CANONICAL_EQU(c) \
( ASCII_CHAR_P (c) ? c \
- : (c) == 0x2329 ? 0x3008 \
- : (c) == 0x232a ? 0x3009 \
+ : (c) == LEFT_POINTING_ANGLE_BRACKET ? LEFT_ANGLE_BRACKET \
+ : (c) == RIGHT_POINTING_ANGLE_BRACKET ? RIGHT_ANGLE_BRACKET \
: c )
#ifdef ENABLE_CHECKING
/* Maximum leading code of multibyte characters. */
#define MAX_MULTIBYTE_LEADING_CODE 0xF8
+/* Unicode character values. */
+enum
+{
+ NO_BREAK_SPACE = 0x00A0,
+ SOFT_HYPHEN = 0x00AD,
+ ZERO_WIDTH_NON_JOINER = 0x200C,
+ ZERO_WIDTH_JOINER = 0x200D,
+ HYPHEN = 0x2010,
+ NON_BREAKING_HYPHEN = 0x2011,
+ LEFT_SINGLE_QUOTATION_MARK = 0x2018,
+ RIGHT_SINGLE_QUOTATION_MARK = 0x2019,
+ PARAGRAPH_SEPARATOR = 0x2029,
+ LEFT_POINTING_ANGLE_BRACKET = 0x2329,
+ RIGHT_POINTING_ANGLE_BRACKET = 0x232A,
+ LEFT_ANGLE_BRACKET = 0x3008,
+ RIGHT_ANGLE_BRACKET = 0x3009,
+ OBJECT_REPLACEMENT_CHARACTER = 0xFFFC,
+};
+
/* Nonzero iff C is a character that corresponds to a raw 8-bit
byte. */
#define CHAR_BYTE8_P(c) ((c) > MAX_5_BYTE_CHAR)
{
Lisp_Object val;
return (c > ' '
- && (c == 0x200C || c == 0x200D
+ && (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER
|| (val = CHAR_TABLE_REF (Vunicode_category_table, c),
(INTEGERP (val) && (XINT (val) <= UNICODE_CATEGORY_So)))));
}
"\xE2\x80\x98" and "\xE2\x80\x99", respectively. */
enum
{
- LEFT_SINGLE_QUOTATION_MARK = 0x2018,
uLSQM0 = 0xE2, uLSQM1 = 0x80, uLSQM2 = 0x98,
uRSQM0 = 0xE2, uRSQM1 = 0x80, uRSQM2 = 0x99,
};
/* Ignore whitespace here, so we can detect eof. */
if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r'
- || c == 0xa0) /* NBSP */
+ || c == NO_BREAK_SPACE)
goto read_next;
if (!NILP (Vpurify_flag) && c == '(')
uninterned_symbol = 1;
c = READCHAR;
if (!(c > 040
- && c != 0xa0 /* NBSP */
+ && c != NO_BREAK_SPACE
&& (c >= 0200
|| strchr ("\"';()[]#`,", c) == NULL)))
{
default:
default_label:
if (c <= 040) goto retry;
- if (c == 0xa0) /* NBSP */
+ if (c == NO_BREAK_SPACE)
goto retry;
read_symbol:
c = READCHAR;
}
while (c > 040
- && c != 0xa0 /* NBSP */
+ && c != NO_BREAK_SPACE
&& (c >= 0200
|| strchr ("\"';()[]#`,", c) == NULL));
non-ASCII spaces and hyphens specially. */
if (! ASCII_CHAR_P (c) && ! NILP (Vnobreak_char_display))
{
- if (c == 0xA0)
+ if (c == NO_BREAK_SPACE)
nonascii_space_p = true;
- else if (c == 0xAD || c == 0x2010 || c == 0x2011)
+ else if (c == SOFT_HYPHEN || c == HYPHEN
+ || c == NON_BREAKING_HYPHEN)
nonascii_hyphen_p = true;
}