aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2005-10-24 03:51:05 +0000
committerStefan Monnier2005-10-24 03:51:05 +0000
commit1149fd6f89324e2b258fcca32697bb9ed9bff289 (patch)
tree314e2bb16ab99ef7631e119210a25b8de250ad92 /src
parent61796b3ce3e502a2f3c8420dd169b230957e80d2 (diff)
downloademacs-1149fd6f89324e2b258fcca32697bb9ed9bff289.tar.gz
emacs-1149fd6f89324e2b258fcca32697bb9ed9bff289.zip
(Fcompare_buffer_substrings): Handle multibyte chars.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c10
1 files changed, 5 insertions, 5 deletions
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. */)
2472{ 2472{
2473 register int begp1, endp1, begp2, endp2, temp; 2473 register int begp1, endp1, begp2, endp2, temp;
2474 register struct buffer *bp1, *bp2; 2474 register struct buffer *bp1, *bp2;
2475 register Lisp_Object *trt 2475 register Lisp_Object trt
2476 = (!NILP (current_buffer->case_fold_search) 2476 = (!NILP (current_buffer->case_fold_search)
2477 ? XCHAR_TABLE (current_buffer->case_canon_table)->contents : 0); 2477 ? XCHAR_TABLE (current_buffer->case_canon_table) : Qnil);
2478 int chars = 0; 2478 int chars = 0;
2479 int i1, i2, i1_byte, i2_byte; 2479 int i1, i2, i1_byte, i2_byte;
2480 2480
@@ -2593,10 +2593,10 @@ determines whether case is significant or ignored. */)
2593 i2++; 2593 i2++;
2594 } 2594 }
2595 2595
2596 if (trt) 2596 if (!NILP (trt))
2597 { 2597 {
2598 c1 = XINT (trt[c1]); 2598 c1 = CHAR_TABLE_TRANSLATE (trt, c1);
2599 c2 = XINT (trt[c2]); 2599 c2 = CHAR_TABLE_TRANSLATE (trt, c2);
2600 } 2600 }
2601 if (c1 < c2) 2601 if (c1 < c2)
2602 return make_number (- 1 - chars); 2602 return make_number (- 1 - chars);