diff -Nru yc-4.0.8.orig/fink/yc-install yc-4.0.8/fink/yc-install
--- yc-4.0.8.orig/fink/yc-install	Thu Jan  1 09:00:00 1970
+++ yc-4.0.8/fink/yc-install	Sat Mar 13 16:06:09 2004
@@ -0,0 +1,63 @@
+#! /bin/sh -e
+#  @PREFIX@/lib/emacsen-common/packages/install/yc
+# [ This particular script hasn't been tested, so be careful. ]
+
+set -e
+
+FLAVOR=$1
+PACKAGE=yc
+
+if [ "X${FLAVOR}" = "X" ]; then
+    echo Need argument to determin FLAVOR of emacs;
+    exit 1
+fi
+
+if [ "X${PACKAGE}" = "X" ]; then
+    echo Internal error: need package name;
+    exit 1;
+fi
+
+## Checking MULE supported XEmacs. (for XEmacs/MULE is needed elisp)
+if [ ${FLAVOR} = "xemacs20" -o ${FLAVOR} = "xemacs21" ]; then
+CHECKMULE=`${FLAVOR} -batch -vanilla -eval "(if (featurep 'mule)(message \"MULE\"))" 2>&1 `
+  if [ "${CHECKMULE}" != "MULE" ]; then
+		echo
+		echo "install/${PACKAGE}: Ignoring ${FLAVOR}."
+		echo "${PACKAGE} needs MULE supported XEmacs."
+		exit
+	fi
+fi
+
+ELDIR=@PREFIX@/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+COMPILE="-batch -q -f batch-byte-compile"
+
+case "${FLAVOR}" in
+	emacs)
+	;;
+	emacs19)
+	echo "install/${PACKAGE}: Ignoring ${FLAVOR}."
+	;;
+	*)
+
+	echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
+
+	rm -rf ${ELCDIR}
+	install -m 755 -d ${ELCDIR}
+
+	# Copy the temp .el files (and Makefile or so)
+	cp ${ELDIR}/* ${ELCDIR}/
+
+	# Byte compile them
+	(cd ${ELCDIR}
+		${FLAVOR} ${COMPILE} yc.el > CompilationLog 2>&1
+		rm -f *.el )
+
+	gzip -9 ${ELCDIR}/CompilationLog
+
+	echo " done."
+	;;
+esac
+
+exit 0;
diff -Nru yc-4.0.8.orig/fink/yc-remove yc-4.0.8/fink/yc-remove
--- yc-4.0.8.orig/fink/yc-remove	Thu Jan  1 09:00:00 1970
+++ yc-4.0.8/fink/yc-remove	Sat Mar 13 16:06:09 2004
@@ -0,0 +1,34 @@
+#!/bin/sh
+# @PREFIX@/lib/emacsen-common/packages/remove/yc
+# [ This particular script hasn't been tested either, so be careful. ]
+set -e
+
+FLAVOR=$1
+PACKAGE=yc
+
+if [ "X${FLAVOR}" = "X" ]; then
+    echo Need argument to determin FLAVOR of emacs;
+    exit 1
+fi
+
+if [ "X${PACKAGE}" = "X" ]; then
+    echo Internal error: need package name;
+    exit 1;
+fi
+
+ELDIR=@PREFIX@/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+case "${FLAVOR}" in
+	emacs)
+	;;
+	emacs19)
+	echo "remove/${PACKAGE}: Ignoring ${FLAVOR}."
+	;;
+	*)
+
+	echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+	rm -rf ${ELCDIR}
+	echo " done."
+	;;
+esac
diff -Nru yc-4.0.8.orig/fink/yc-startup yc-4.0.8/fink/yc-startup
--- yc-4.0.8.orig/fink/yc-startup	Thu Jan  1 09:00:00 1970
+++ yc-4.0.8/fink/yc-startup	Thu Mar 18 16:28:46 2004
@@ -0,0 +1,19 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Fink yc package
+;;
+;; We have to add this to the load-path:
+(setq load-path 
+      (cons 
+       (concat "@PREFIX@/share/" (symbol-name fink-emacs-flavor)
+              "/site-lisp/yc")
+       load-path))
+
+(global-set-key "\M-\ " 'yc-mode)
+(setq yc-stop-chars "(){}<>")
+;(setq yc-server-host "unix")
+(setq yc-use-color t)
+(setq yc-canna-lib-path "@PREFIX@/share/canna")
+(setq yc-icanna-path "@PREFIX@/lib/yc/icanna")
+(load "yc")
+;(global-yc-mode 1)
diff -Nru yc-4.0.8.orig/yc.el yc-4.0.8/yc.el
--- yc-4.0.8.orig/yc.el	Fri Mar  5 00:02:06 2004
+++ yc-4.0.8/yc.el	Tue May  4 00:00:00 2004
@@ -178,6 +178,12 @@
 $BHs(Bnil$B$N>l9g!"H>3Q$+$JM-8z!#(Bnil$B$N>l9g!"H>3Q$+$JL58z(B"
   :type 'boolean
   :group 'yc)
+(defcustom yc-connect-server-at-startup nil
+  "*yc$B$rFI$_9~$s$@$i$9$0$K%5!<%P$K@\B3$9$k!#(B
+$BHs(Bnil$B$N>l9g!"$9$0@\B3$9$k!#(Bnil$B$N>l9g!":G=i$K4A;zJQ49%-!<$r2!$9$^$G@\B3$7$J$$!#(B
+(fink hack for Emacs >= 2.1.50-20011124)"
+  :type 'boolean
+  :group 'yc)
 
 ;; minibuffer $B%-!<%P%$%s%I(B
 (and (boundp 'minibuffer-local-map) minibuffer-local-map
@@ -1339,15 +1345,21 @@
 (defun yc-read-string-from-file (file)
   (let* ((suffix (file-name-extension file))
 	 ;; emacs-20.x
+	 ;;(auto-coding-alist
+	 ;; (if suffix
+	 ;;     (list (cons (concat "\\." suffix) 'japanese-iso-8bit))
+	 ;;   auto-coding-alist))
+	 ;; fink hack for utf-8 environment
 	 (auto-coding-alist
-	  (if suffix
-	      (list (cons (concat "\\." suffix) 'japanese-iso-8bit))
-	    auto-coding-alist))
+	  (list (cons "" 'japanese-iso-8bit)))
 	 ;; XEmacs-20.x
+	 ;;(file-coding-system-alist
+	 ;; (if suffix
+	 ;;     (list (cons (concat "\\." suffix) 'euc-jp))
+	 ;;   file-coding-system-alist))
+	 ;; fink hack for utf-8 environment
 	 (file-coding-system-alist
-	  (if suffix
-	      (list (cons (concat "\\." suffix) 'euc-jp))
-	    file-coding-system-alist))
+	  (list (cons "" 'euc-jp)))
 
 	 (buf (get-file-buffer file))
          (flag (not buf))
@@ -1774,9 +1786,14 @@
     (cond ((eq (car dic) :bushu)
 	   (setq yc-rc-bushu-dic-list (cons (cadr dic) yc-rc-bushu-dic-list)
 		 dic (cddr dic)))
-	  ((eq (car dic) :user)
+	  ;; TODO: autodef feature
+	  ((or (eq (car dic) :user)
+	       (eq (car dic) :katakana) (eq (car dic) :hiragana))
 	   (setq yc-rc-user-dic-list (cons (cadr dic) yc-rc-user-dic-list)
 		 dic (cddr dic)))
+	  ((eq (car dic) :grammar)
+	   (setq yc-rc-dic-list (cons (cadr dic) yc-rc-dic-list)
+		 dic (cddr dic)))
 	  (t (setq yc-rc-dic-list (cons (car dic) yc-rc-dic-list)
 		   dic (cdr dic))))))
 
@@ -4017,7 +4034,8 @@
   (setq default-input-method "japanese-yc"))
 
 (yc-setup)
-(when (yc-server-check)
+;; fink hack for Emacs >= 21.1.50-20011124
+(when (and yc-connect-server-at-startup (yc-server-check))
   (yc-init)
   (force-yc-input-mode)
   )
