From xemacs-m  Wed Mar 26 16:47:28 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA05839
	for <xemacs-beta@xemacs.org>; Wed, 26 Mar 1997 16:47:27 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id OAA08150;
	Wed, 26 Mar 1997 14:58:46 -0800
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: canna-use-color (was Re: error with 20.1)
References: <199703251655.IAA15026@mharnois.workgroup.net> <m2u3lzml5d.fsf@altair.xemacs.org> <87sp1j1q3u.fsf_-_@sbt.net> <ryslo7bnl7p.fsf@skywalk.jsys.co.jp> <m24tdyi8gu.fsf@altair.xemacs.org>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Steven L Baur's message of 26 Mar 1997 14:39:29 -0800
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Date: 26 Mar 1997 14:58:42 -0800
Message-ID: <m2u3lyi7kt.fsf@altair.xemacs.org>
Lines: 48
X-Mailer: Gnus v5.4.37/XEmacs 20.1(beta10)

I wrote:
> Actually, I think the problem is in the undocumented variable
> canna-henkan-revlen (the source of the marked 11 above).

The following patch seems to fix the problem.  I see text being
inserted in Red in fence mode and turning to Blue on White when SPC is
hit.  Presumably this is what canna-use-color t is supposed to do.

Index: src/mule-canna.c
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/src/mule-canna.c,v
retrieving revision 1.4
diff -u -r1.4 mule-canna.c
--- mule-canna.c	1997/03/22 06:03:32	1.4
+++ mule-canna.c	1997/03/26 22:43:59
@@ -1589,6 +1589,7 @@
 }	
 
 /* return the MULE internal string length of EUC string */
+/* Modified by sb to return a character count not byte count. */
 static int
 mule_strlen (unsigned char *p, int l)
 {
@@ -1599,17 +1600,17 @@
     {
       if ((unsigned char) ch == ISO_CODE_SS2)
 	{
-	  len += 2;
+	  len++;
 	  cp += 2;
 	}
       else if ((unsigned char) ch == ISO_CODE_SS3)
 	{
-	  len += 3;
+	  len++;
 	  cp += 3;
 	}
       else if (ch & 0x80)
 	{
-	  len += 3;
+	  len++;
 	  cp += 2;
 	}
       else

-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

