(canna-self-insert-string-filter): Define for every cases; add DOC.
authortomo <tomo>
Sat, 28 Aug 2004 15:41:01 +0000 (15:41 +0000)
committertomo <tomo>
Sat, 28 Aug 2004 15:41:01 +0000 (15:41 +0000)
(canna-self-insert-string): Call `canna-self-insert-string-filter'
even if non-XEmacs is running.
(canna-mode-map): Add settings for [delete] and [backspace] in XEmacs.

canna.el

index df4d72f..8c4e055 100644 (file)
--- a/canna.el
+++ b/canna.el
   (interactive)
   (message (concat canna-version " ...")))
 
+(defvar canna-self-insert-string-filter nil
+  "*\e$B3NDj;~$K8F$P$l$k%U%#%k%?!<4X?t$r;XDj$9$k$?$a$NJQ?t!#\e(B
+\e$B@_Dj$5$l$k%U%#%k%?!<4X?t$O#10z?t$N4X?t$G!"\e(B
+\e$B$=$N0z?t$K3NDjJ8;zNs$,EO$5$l$k!#\e(B
+\e$B$^$?!"%U%#%k%?!<4X?t$OJ8;zNs$rJV$5$J$1$l$P$J$i$J$$!#\e(B
+\e$B>e5-$N;HMQ$rK~$?$94X?t$NB>!"\e(Bnil \e$B$r;XDj$9$k$3$H$,$G$-!"\e(B
+\e$B$=$N>l9g$OL5JQ49$rI=$9!#\e(B")
+
 (cond
  ((featurep 'xemacs)
-  (defvar canna-self-insert-string-filter (function identity))
   (defun canna-self-insert-string (string)
     (if (functionp canna-self-insert-string-filter)
        (setq string (funcall canna-self-insert-string-filter string)))
        (setq i (1+ i)))))
   )
  (t
-  (defalias 'canna-self-insert-string 'insert)
+  ;; (defalias 'canna-self-insert-string 'insert)
+  (defun canna-self-insert-string (string)
+    (if canna-self-insert-string-filter
+       (setq string (funcall canna-self-insert-string-filter string)))
+    (insert string))
   ))
 
 
@@ -308,6 +319,8 @@ t \e$B$N;~$O%G%U%)%k%H$N?'$r;HMQ$9$k!#\e(B
        (define-key canna-mode-map [(control left)]  "\C-b")
        (define-key canna-mode-map [kanji]           " ")
        (define-key canna-mode-map [(control space)] [(control @)])
+       (define-key canna-mode-map [delete] "\C-?")
+       (define-key canna-mode-map [backspace] "\C-h")
        )
       (t
        (define-key canna-mode-map [up]      [?\C-p])