changeset 66367:a80af18dfc7e

(Fcompare_buffer_substrings): Handle multibyte chars.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 24 Oct 2005 03:51:05 +0000
parents 83b1c90a7db4
children db684dc70440
files src/editfns.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Mon Oct 24 03:37:47 2005 +0000
+++ b/src/editfns.c	Mon Oct 24 03:51:05 2005 +0000
@@ -2472,9 +2472,9 @@
 {
   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 @@
 	  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);