aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>1997-05-28 04:36:42 +0000
committerKenichi Handa <[email protected]>1997-05-28 04:36:42 +0000
commitf1e0f5469e1b46e0a4e39433d80ac6e3bd64a86c (patch)
tree32986f4e2552e8d52d02f979fa9860aeac927e24
parent8ac904700f147b40f8b1540b58fd3cefe2da5826 (diff)
(Fchar_equal): Make it handle case of multibyte
characters.
-rw-r--r--src/editfns.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 0ba19e3ed0..c433be3a6d 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2309,18 +2309,12 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer.")
(c1, c2)
register Lisp_Object c1, c2;
{
- Lisp_Object *downcase = DOWNCASE_TABLE;
CHECK_NUMBER (c1, 0);
CHECK_NUMBER (c2, 1);
- if ((!NILP (current_buffer->case_fold_search)
- && SINGLE_BYTE_CHAR_P (c1) /* For the moment, downcase table is */
- && SINGLE_BYTE_CHAR_P (c2) /* implemented only for ASCII characters. */
- )
- ? ((XINT (downcase[0xff & XFASTINT (c1)])
- == XINT (downcase[0xff & XFASTINT (c2)]))
- && (XFASTINT (c1) & ~0xff) == (XFASTINT (c2) & ~0xff))
- : XINT (c1) == XINT (c2))
+ if (XINT (c1) == XINT (c2)
+ && (NILP (current_buffer->case_fold_search)
+ || DOWNCASE (XFASTINT (c1)) == DOWNCASE (XFASTINT (c2))))
return Qt;
return Qnil;
}