modified for GNU Mule 19.34.94-epsilon with dl patch.
authormorioka <morioka>
Thu, 3 Apr 1997 18:33:12 +0000 (18:33 +0000)
committermorioka <morioka>
Thu, 3 Apr 1997 18:33:12 +0000 (18:33 +0000)
canna.el

index d9b231a..0cd4d03 100644 (file)
--- a/canna.el
+++ b/canna.el
 
 ;; -*-mode: emacs-lisp-*-
 
+;; by \e$B<i2,\e(B \e$BCNI'\e(B <morioka@jaist.ac.jp> 1996/11/11
+(or (boundp 'CANNA)
+    (let ((handle (dynamic-link "canna.so")))
+      (dynamic-call "emacs_canna_init" handle))
+    )
+
+(defvar self-insert-after-hook nil)
+;; (defalias 'self-insert-internal 'self-insert-command)
+;; end
+
 (defconst canna-rcs-version "Canna/mule 2.x, based on Canna 2.2/3.2. : canna.el,v x.xx 1994/11/7 00:00:00")
 
 (defun canna-version ()
@@ -365,13 +375,16 @@ kana-to-kanji translation."
                (set-marker canna:*spos-undo-text* (point))
 ;;
 ;; update kbnes
-               (let ((list (string-to-char-list canna-kakutei-string))
-                 ;; \e$BA^F~$NESCf$G\e(B blink \e$B$,5/$-$k$H$&$C$H$*$7$$$N$G!"\e(B
-                 ;; \e$B0l;~E*$K\e(B blink \e$B$rM^;_$9$k!#\e(B
-                     (blink-matching-paren nil))
-                 (while list
-                   (self-insert-internal (car list))
-                   (setq list (cdr list))))
+               ;; by \e$B<i2,\e(B \e$BCNI'\e(B <morioka@jaist.ac.jp> 1996/11/8
+               ;;      \e$B$H$j$"$($:\e(B insert \e$B$K$7$H$/!#\e(B
+               (insert canna-kakutei-string)
+               ;;(let ((list (string-to-char-list canna-kakutei-string))
+               ;;        ;; \e$BA^F~$NESCf$G\e(B blink \e$B$,5/$-$k$H$&$C$H$*$7$$$N$G!"\e(B
+               ;;        ;; \e$B0l;~E*$K\e(B blink \e$B$rM^;_$9$k!#\e(B
+               ;;                    (blink-matching-paren nil))
+               ;;                (while list
+               ;;                  (self-insert-internal (car list))
+               ;;                  (setq list (cdr list))))
                ;; \e$BL$3NDj$NJ8;z$,$J$/!"3NDjJ8;zNs$N:G8e$,JD$83g8L$N\e(B
                ;; \e$BN`$@$C$?$H$-$O\e(B blink \e$B$5$;$k!#\e(B
                (if (and canna-empty-info
@@ -399,13 +412,17 @@ kana-to-kanji translation."
               (t
 ;;
 ;; update kbnes
-               (let ((list (string-to-char-list canna-kakutei-string))
-                 ;; \e$BA^F~$NESCf$G\e(B blink \e$B$,5/$-$k$H$&$C$H$*$7$$$N$G!"\e(B
-                 ;; \e$B0l;~E*$K\e(B blink \e$B$rM^;_$9$k!#\e(B
-                     (blink-matching-paren nil))
-                 (while list
-                   (self-insert-internal (car list))
-                   (setq list (cdr list))))
+               ;; by \e$B<i2,\e(B \e$BCNI'\e(B <morioka@jaist.ac.jp> 1996/11/8
+               ;;      \e$B$H$j$"$($:\e(B insert \e$B$K$7$H$/!#\e(B
+               (insert canna-kakutei-string)
+                ;; (let ((list (string-to-char-list canna-kakutei-string))
+                ;;   ;; \e$BA^F~$NESCf$G\e(B blink \e$B$,5/$-$k$H$&$C$H$*$7$$$N$G!"\e(B
+                ;;   ;; \e$B0l;~E*$K\e(B blink \e$B$rM^;_$9$k!#\e(B
+                ;;       (blink-matching-paren nil))
+                ;;   (while list
+                ;;     (self-insert-internal (car list))
+                ;;     (setq list (cdr list))))
+               
                ;; \e$BL$3NDj$NJ8;z$,$J$/!"3NDjJ8;zNs$N:G8e$,JD$83g8L$N\e(B
                ;; \e$BN`$@$C$?$H$-$O\e(B blink \e$B$5$;$k!#\e(B
                (if (and canna-empty-info
@@ -447,34 +464,34 @@ kana-to-kanji translation."
             (canna:yomi-attr-on canna:*region-start* canna:*region-end*))
         (setq canna:*last-kouho* canna-henkan-length)
         ))
-
-        ;; \e$B8uJdNN0h$G$O6/D4$7$?$$J8;zNs$,B8:_$9$k$b$N$H9M$($i\e(B
-        ;; \e$B$l$k!#6/D4$7$?$$J8;z$O\e(BEmacs\e$B$G$O%+!<%=%k%]%8%7%g%s$K$FI=<(\e(B
-        ;; \e$B$9$k$3$H$H$9$k!#6/D4$7$?$$J8;z$,$J$$$N$G$"$l$P!"%+!<%=%k\e(B
-        ;; \e$B$O0lHV8e$NItJ,\e(B(\e$BF~NO$,9T$o$l$k%]%$%s%H\e(B)\e$B$KCV$$$F$*$/!#\e(B
-
-        ;; \e$B%+!<%=%k$r0\F0$9$k!#\e(B
-        (if (not canna-underline)
-            (backward-char 
-             (- canna:*last-kouho*
-                ;; \e$B%+!<%=%k0LCV$O!"H?E>I=<(ItJ,$,B8:_$7$J$$$N$G$"$l$P!"\e(B
-                ;; \e$B8uJdJ8;zNs$N:G8e$NItJ,$H$7!"H?E>I=<(ItJ,$,B8:_$9$k$N\e(B
-                ;; \e$B$G$"$l$P!"$=$NItJ,$N;O$a$H$9$k!#\e(B
-                (cond ((zerop canna-henkan-revlen)
-                       canna:*last-kouho*)
-                      (t canna-henkan-revpos) )) )
-          (if (and (> canna-henkan-revlen 0)
-                   (> canna-henkan-length 0))
-                   ; \e$B8uJd$ND9$5$,\e(B0\e$B$G$J$/!"\e(B
-                   ; \e$BH?E>I=<($ND9$5$,\e(B0\e$B$G$J$1$l$P!"\e(B
-                   ; \e$B$=$NItJ,$rJQE>I=<($9$k!#\e(B
-              (let ((start (+ canna:*region-start*
-                              (if canna-with-fences 1 0)
-                              canna-henkan-revpos) ))
-                (if canna-underline
-                    (canna:henkan-attr-on start 
-                                          (+ start canna-henkan-revlen)))))
-          ) )
+  
+  ;; \e$B8uJdNN0h$G$O6/D4$7$?$$J8;zNs$,B8:_$9$k$b$N$H9M$($i\e(B
+  ;; \e$B$l$k!#6/D4$7$?$$J8;z$O\e(BEmacs\e$B$G$O%+!<%=%k%]%8%7%g%s$K$FI=<(\e(B
+  ;; \e$B$9$k$3$H$H$9$k!#6/D4$7$?$$J8;z$,$J$$$N$G$"$l$P!"%+!<%=%k\e(B
+  ;; \e$B$O0lHV8e$NItJ,\e(B(\e$BF~NO$,9T$o$l$k%]%$%s%H\e(B)\e$B$KCV$$$F$*$/!#\e(B
+  
+  ;; \e$B%+!<%=%k$r0\F0$9$k!#\e(B
+  (if (not canna-underline)
+      (backward-char 
+       (- canna:*last-kouho*
+         ;; \e$B%+!<%=%k0LCV$O!"H?E>I=<(ItJ,$,B8:_$7$J$$$N$G$"$l$P!"\e(B
+         ;; \e$B8uJdJ8;zNs$N:G8e$NItJ,$H$7!"H?E>I=<(ItJ,$,B8:_$9$k$N\e(B
+         ;; \e$B$G$"$l$P!"$=$NItJ,$N;O$a$H$9$k!#\e(B
+         (cond ((zerop canna-henkan-revlen)
+                canna:*last-kouho*)
+               (t canna-henkan-revpos) )) )
+    (if (and (> canna-henkan-revlen 0)
+            (> canna-henkan-length 0))
+                                       ; \e$B8uJd$ND9$5$,\e(B0\e$B$G$J$/!"\e(B
+                                       ; \e$BH?E>I=<($ND9$5$,\e(B0\e$B$G$J$1$l$P!"\e(B
+                                       ; \e$B$=$NItJ,$rJQE>I=<($9$k!#\e(B
+       (let ((start (+ canna:*region-start*
+                       (if canna-with-fences 1 0)
+                       canna-henkan-revpos) ))
+         (if canna-underline
+             (canna:henkan-attr-on start 
+                                   (+ start canna-henkan-revlen)))))
+    ) )
 
 (defun canna:display-candidates (strs)
   (cond ((stringp strs) ; \e$B%(%i!<$,5/$3$C$?>l9g\e(B
@@ -1236,7 +1253,7 @@ self insert otherwise."
 (defun canna:yomi-attr-on (start end)
   (if (overlayp canna:*yomi-overlay*)
       (move-overlay canna:*yomi-overlay* start end)
-    (overlay-put (setq canna:*yomi-overlay* (make-overlay start end nil t))
+    (overlay-put (setq canna:*yomi-overlay* (make-overlay start end nil nil t))
                 'face 
                 (if canna:color-p 'attr-yomi 'underline))
     )
@@ -1251,7 +1268,8 @@ self insert otherwise."
 (defun canna:henkan-attr-on (start end)
   (if (overlayp canna:*henkan-overlay*)
       (move-overlay canna:*henkan-overlay* start end)
-    (overlay-put (setq canna:*henkan-overlay* (make-overlay start end nil t))
+    (overlay-put (setq canna:*henkan-overlay*
+                      (make-overlay start end nil nil t))
                 'face 
                 (if canna:color-p 'attr-taishou 'region))
        )
@@ -1266,7 +1284,8 @@ self insert otherwise."
 (defun canna:select-attr-on (start end)
   (if (overlayp canna:*select-overlay*)
       (move-overlay canna:*select-overlay* start end)
-    (overlay-put (setq canna:*select-overlay* (make-overlay start end nil t))
+    (overlay-put (setq canna:*select-overlay*
+                      (make-overlay start end nil nil t))
                 'face 
                 'attr-select))
   )