summaryrefslogtreecommitdiff
path: root/src/character.h
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-11-27 07:59:35 +0000
committerKenichi Handa <handa@m17n.org>2008-11-27 07:59:35 +0000
commit55870ffc30547ff5dacd37db45fed4b38a0dd7e6 (patch)
tree38077594d690ddb73fc35e652ba612076d5e6be1 /src/character.h
parentcd486875776635d52c854f41863011f16291b82a (diff)
downloademacs-55870ffc30547ff5dacd37db45fed4b38a0dd7e6.tar.gz
(MAYBE_UNIFY_CHAR): Call maybe_unify_char instead of
Funify_charset.
Diffstat (limited to 'src/character.h')
-rw-r--r--src/character.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/character.h b/src/character.h
index 44b8b29101a..34e696e5083 100644
--- a/src/character.h
+++ b/src/character.h
@@ -574,26 +574,18 @@ extern char unibyte_has_multibyte_table[256];
/* If C is a character to be unified with a Unicode character, return
the unified Unicode character. */
-#define MAYBE_UNIFY_CHAR(c) \
- if (c > MAX_UNICODE_CHAR \
- && CHAR_TABLE_P (Vchar_unify_table)) \
- { \
- Lisp_Object val; \
- int unified; \
- \
- val = CHAR_TABLE_REF (Vchar_unify_table, c); \
- if (! NILP (val)) \
- { \
- if (SYMBOLP (val)) \
- { \
- Funify_charset (val, Qnil, Qnil); \
- val = CHAR_TABLE_REF (Vchar_unify_table, c); \
- } \
- if ((unified = XINT (val)) >= 0) \
- c = unified; \
- } \
- } \
- else
+#define MAYBE_UNIFY_CHAR(c) \
+ do { \
+ if (c > MAX_UNICODE_CHAR && c <= MAX_5_BYTE_CHAR) \
+ { \
+ Lisp_Object val; \
+ val = CHAR_TABLE_REF (Vchar_unify_table, c); \
+ if (INTEGERP (val)) \
+ c = XINT (val); \
+ else if (! NILP (val)) \
+ c = maybe_unify_char (c, val); \
+ } \
+ } while (0)
/* Return the width of ASCII character C. The width is measured by