* pccl-20.el (ccl-compat): new advice for `make-coding-system' of
authorakr <akr>
Thu, 28 Dec 2000 11:16:57 +0000 (11:16 +0000)
committerakr <akr>
Thu, 28 Dec 2000 11:16:57 +0000 (11:16 +0000)
XEmacs to handle Emacs style CCL coding system definition.

ChangeLog
pccl-20.el

index 0af877f..b5532b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-28  Tanaka Akira      <akr@m17n.org>
+
+       * pccl-20.el (ccl-compat): new advice for `make-coding-system' of
+       XEmacs to handle Emacs style CCL coding system definition.
+
 2000-12-28  Kenichi Handa     <handa@etl.go.jp>
 
        * static.el: Doc-string fixed.
index b95244a..0a67371 100644 (file)
 
 (eval-and-compile
 
+  (static-if (featurep 'xemacs)
+      (defadvice make-coding-system (before ccl-compat (name type &rest ad-subr-args) activate)
+       (when (and (integerp type)
+                  (eq type 4)
+                  (characterp (ad-get-arg 2))
+                  (stringp (ad-get-arg 3))
+                  (consp (ad-get-arg 4))
+                  (symbolp (car (ad-get-arg 4)))
+                  (symbolp (cdr (ad-get-arg 4))))
+         (setq type 'ccl)
+         (setq ad-subr-args
+               (list
+                (ad-get-arg 3)
+                (append
+                 (list
+                  'mnemonic (char-to-string (ad-get-arg 2))
+                  'decode (symbol-value (car (ad-get-arg 4)))
+                  'encode (symbol-value (cdr (ad-get-arg 4))))
+                 (ad-get-arg 5)))))))
+
   (if (featurep 'xemacs)
       (defun make-ccl-coding-system (name mnemonic docstring decoder encoder)
        "\