aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1997-05-28 04:36:42 +0000
committerKenichi Handa1997-05-28 04:36:42 +0000
commitf1e0f5469e1b46e0a4e39433d80ac6e3bd64a86c (patch)
tree32986f4e2552e8d52d02f979fa9860aeac927e24 /src
parent8ac904700f147b40f8b1540b58fd3cefe2da5826 (diff)
downloademacs-f1e0f5469e1b46e0a4e39433d80ac6e3bd64a86c.tar.gz
emacs-f1e0f5469e1b46e0a4e39433d80ac6e3bd64a86c.zip
(Fchar_equal): Make it handle case of multibyte
characters.
Diffstat (limited to 'src')
-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.")
2309 (c1, c2) 2309 (c1, c2)
2310 register Lisp_Object c1, c2; 2310 register Lisp_Object c1, c2;
2311{ 2311{
2312 Lisp_Object *downcase = DOWNCASE_TABLE;
2313 CHECK_NUMBER (c1, 0); 2312 CHECK_NUMBER (c1, 0);
2314 CHECK_NUMBER (c2, 1); 2313 CHECK_NUMBER (c2, 1);
2315 2314
2316 if ((!NILP (current_buffer->case_fold_search) 2315 if (XINT (c1) == XINT (c2)
2317 && SINGLE_BYTE_CHAR_P (c1) /* For the moment, downcase table is */ 2316 && (NILP (current_buffer->case_fold_search)
2318 && SINGLE_BYTE_CHAR_P (c2) /* implemented only for ASCII characters. */ 2317 || DOWNCASE (XFASTINT (c1)) == DOWNCASE (XFASTINT (c2))))
2319 )
2320 ? ((XINT (downcase[0xff & XFASTINT (c1)])
2321 == XINT (downcase[0xff & XFASTINT (c2)]))
2322 && (XFASTINT (c1) & ~0xff) == (XFASTINT (c2) & ~0xff))
2323 : XINT (c1) == XINT (c2))
2324 return Qt; 2318 return Qt;
2325 return Qnil; 2319 return Qnil;
2326} 2320}