From xemacs-m  Wed Mar 26 01:53:09 1997
Received: from ns.jsys.co.jp (root@ns.jsys.co.jp [202.33.240.82])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id BAA23907
	for <xemacs-beta@xemacs.org>; Wed, 26 Mar 1997 01:53:07 -0600 (CST)
Received: from cosmos.jsys.co.jp (root@cosmos.jsys.co.jp [172.31.80.5])
	by ns.jsys.co.jp (8.8.5/8.8.5) with ESMTP id QAA24618
	for <xemacs-beta@xemacs.org>; Wed, 26 Mar 1997 16:53:05 +0900 (JST)
Received: from j-04110.jsys.co.jp (j-04110.jsys.co.jp [172.31.49.72])
	by cosmos.jsys.co.jp (8.8.5/8.8.5) with ESMTP id QAA01689
	for <xemacs-beta@xemacs.org>; Wed, 26 Mar 1997 16:53:04 +0900 (JST)
Received: (from ienaga@localhost) by j-04110.jsys.co.jp (8.8.5/3.5Wpl2) id QAA09457; Wed, 26 Mar 1997 16:53:02 +0900 (JST)
Sender: ienaga@j-04110.jsys.co.jp
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>
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=ISO-2022-JP
From: Kazuyuki IENAGA <ienaga@jsys.co.jp>
Date: 26 Mar 1997 16:52:58 +0900
In-Reply-To: mharnois@sbt.net's message of 25 Mar 1997 15:58:13 -0800
Message-ID: <ryslo7bnl7p.fsf@skywalk.jsys.co.jp>
Lines: 52
X-Mailer: Gnus v5.4.11/Emacs 19.34

mharnois@sbt.net writes:

> > b) M-x canna, I get
> > 
> > > Wrong number of arguments #<subr x-get-resource>, 2
> Signaling: (wrong-number-of-arguments #<subr x-get-resource> 2)
>   x-get-resource("ReverseVideo" "reverseVideo")

The x-get-resource problem could be solved by applying this patch, but 
there's another problem in src/extents.c.

lisp/prim/overlay.el calls make-extent in src/extents.c and when I
convert Japanese-Hiragana to Kanji, XEmacs reports:

Signaling: (args-out-of-range #<buffer "*scratch*"> 2 11)
  make-extent(2 11 #<buffer "*scratch*">)
  make-overlay(2 11 nil t)
  canna:henkan-attr-on(2 11)
  canna:insert-preedit()
  canna:display-candidates(0)
  canna:functional-insert-command2(?\  1)
  canna-functional-insert-command(1)
  call-interactively(canna-functional-insert-command)

FYI: In GNU Emacs, make-overlay is a built-in function, but XEmacs
uses lisp code.


--- canna.el	1997/03/26 06:32:52	1.1
+++ canna.el	1997/03/26 06:42:02
@@ -49,6 +49,8 @@
 ;; added by MORIOKA Tomohiko <morioka@jaist.ac.jp>, 1996/6/18
 (defvar running-xemacs (string-match "XEmacs" emacs-version))
 
+(if running-xemacs (require 'overlay))
+
 (if running-xemacs
     (progn
       (defun self-insert-string (string)
@@ -935,7 +937,9 @@
 			      (eq hilit-background-mode 'dark))
 			 (string-match
 			  "on\\|t"
-			  (or (x-get-resource "ReverseVideo" "reverseVideo")
+			  (or (if running-xemacs
+				  (x-get-resource "ReverseVideo" "reverseVideo" 'string)
+				(x-get-resource "ReverseVideo" "reverseVideo"))
 			      "")))
 		     'reverse)	;$BH?E>$7$F$$$k$J$i(B 'reverse
 		    (t 'normal)))


