From: tomo Date: Tue, 24 Aug 2004 13:39:15 +0000 (+0000) Subject: (canna-self-insert-string-filter): New variable for XEmacs. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=840ae24229e63454f9130150d280ed4aceeb1251;p=elisp%2Femacs-canna.git (canna-self-insert-string-filter): New variable for XEmacs. (canna-self-insert-string): Call `canna-self-insert-string-filter' is it is bound to function. --- diff --git a/canna.el b/canna.el index bb02483..9e89926 100644 --- 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 ;; MORIOKA Tomohiko ;; Stephen Turnbull -;; Version: $Revision: 1.20 $ +;; Version: $Revision: 1.21 $ ;; Keywords: Canna, Japanese, input method, mule, multilingual ;; This file is part of Emacs-Canna. @@ -66,19 +66,24 @@ (interactive) (message (concat canna-version " ..."))) -(if (featurep 'xemacs) - (defun canna-self-insert-string (string) - (let ((len (length string)) - (i 0) - ;; 挿入の途中で blink が起きるとうっとおしいので、 - ;; 一時的に blink を抑止する。 - (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) + ;; 挿入の途中で blink が起きるとうっとおしいので、 + ;; 一時的に blink を抑止する。 + (blink-matching-paren nil)) + (while (< i len) + (self-insert-internal (aref string i)) + (setq i (1+ i))))) ) + (t + (defalias 'canna-self-insert-string 'insert) + )) ;;; かんなの変数