changeset 18007:544bdf0ca834

(Fchar_equal): Make it handle case of multibyte characters.
author Kenichi Handa <handa@m17n.org>
date Wed, 28 May 1997 04:36:42 +0000
parents d29a9b467ac9
children d25d2472df51
files src/editfns.c
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Wed May 28 04:36:36 1997 +0000
+++ b/src/editfns.c	Wed May 28 04:36:42 1997 +0000
@@ -2309,18 +2309,12 @@
   (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;
 }