summaryrefslogtreecommitdiff
path: root/src/editfns.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-05-28 04:36:42 +0000
committerKenichi Handa <handa@m17n.org>1997-05-28 04:36:42 +0000
commit2d03e301bf2f9c1c386530ac0f4033b714d44358 (patch)
treea5427f90b517023590329d546d329d6f07b7274d /src/editfns.c
parent47d2a6da9f8c56ccd47930c838f6e108b858f810 (diff)
downloademacs-2d03e301bf2f9c1c386530ac0f4033b714d44358.tar.gz
(Fchar_equal): Make it handle case of multibyte
characters.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 0ba19e3ed01..c433be3a6df 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;
}