From: Stefan Monnier Date: Mon, 24 Oct 2005 03:51:05 +0000 (+0000) Subject: (Fcompare_buffer_substrings): Handle multibyte chars. X-Git-Tag: emacs-pretest-22.0.90~6358 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1149fd6f89324e2b258fcca32697bb9ed9bff289;p=emacs.git (Fcompare_buffer_substrings): Handle multibyte chars. --- diff --git a/src/editfns.c b/src/editfns.c index c3982b10cea..4471e4553da 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2472,9 +2472,9 @@ determines whether case is significant or ignored. */) { register int begp1, endp1, begp2, endp2, temp; register struct buffer *bp1, *bp2; - register Lisp_Object *trt + register Lisp_Object trt = (!NILP (current_buffer->case_fold_search) - ? XCHAR_TABLE (current_buffer->case_canon_table)->contents : 0); + ? XCHAR_TABLE (current_buffer->case_canon_table) : Qnil); int chars = 0; int i1, i2, i1_byte, i2_byte; @@ -2593,10 +2593,10 @@ determines whether case is significant or ignored. */) i2++; } - if (trt) + if (!NILP (trt)) { - c1 = XINT (trt[c1]); - c2 = XINT (trt[c2]); + c1 = CHAR_TABLE_TRANSLATE (trt, c1); + c2 = CHAR_TABLE_TRANSLATE (trt, c2); } if (c1 < c2) return make_number (- 1 - chars);