(canna-self-insert-string-filter): New variable for XEmacs.
authortomo <tomo>
Tue, 24 Aug 2004 13:39:15 +0000 (13:39 +0000)
committertomo <tomo>
Tue, 24 Aug 2004 13:39:15 +0000 (13:39 +0000)
(canna-self-insert-string): Call `canna-self-insert-string-filter' is
it is bound to function.

canna.el

index bb02483..9e89926 100644 (file)
--- a/canna.el
+++ b/canna.el
@@ -1,13 +1,13 @@
 ;;; canna.el --- Interface to the Canna input method.
 
 ;; Copyright (C) 1994 Akira Kon, NEC Corporation.
-;; Copyright (C) 1996,1997,1998 MORIOKA Tomohiko
+;; Copyright (C) 1996,1997,1998,2004 MORIOKA Tomohiko
 ;; Copyright (C) 1997 Stephen Turnbull
 
 ;; Author: Akira Kon <kon@d1.bs2.mt.nec.co.jp>
 ;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;         Stephen Turnbull <turnbull@sk.tsukuba.ac.jp>
-;; Version: $Revision: 1.20 $
+;; Version: $Revision: 1.21 $
 ;; Keywords: Canna, Japanese, input method, mule, multilingual
 
 ;; This file is part of Emacs-Canna.
   (interactive)
   (message (concat canna-version " ...")))
 
-(if (featurep 'xemacs)
-    (defun canna-self-insert-string (string)
-      (let ((len (length string))
-           (i 0)
-           ;; \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 (< i len)
-         (self-insert-internal (aref canna-kakutei-string i))
-         (setq i (1+ i))
-         )))
-  (defalias 'canna-self-insert-string 'insert)
+(cond
+ ((featurep 'xemacs)
+  (defvar canna-self-insert-string-filter (function identity))
+  (defun canna-self-insert-string (string)
+    (if (fboundp canna-self-insert-string-filter)
+       (setq string (funcall canna-self-insert-string-filter string)))
+    (let ((len (length string))
+         (i 0)
+         ;; \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 (< i len)
+       (self-insert-internal (aref string i))
+       (setq i (1+ i)))))
   )
+ (t
+  (defalias 'canna-self-insert-string 'insert)
+  ))
 
 
 ;;; \e$B$+$s$J$NJQ?t\e(B