X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=pccl-20.el;h=0a673710745bfd4542fb940fc23ac4bbd5796c12;hb=a28bd2cf8a18a82d6bc79d107c362faf46e3817c;hp=18cade1c46d7d3c306ab406fe79ce4d5997cbcd6;hpb=0df64d3b6ef5ae5212fd59ee13dd5f044b378ba6;p=elisp%2Fapel.git diff --git a/pccl-20.el b/pccl-20.el index 18cade1..0a67371 100644 --- a/pccl-20.el +++ b/pccl-20.el @@ -1,4 +1,4 @@ -;;; pccl-20.el --- Portable CCL utility for Emacs 20 and XEmacs-mule +;;; pccl-20.el --- Portable CCL utility for Emacs 20 and XEmacs-21-mule ;; Copyright (C) 1998 Free Software Foundation, Inc. ;; Copyright (C) 1998 Tanaka Akira @@ -25,8 +25,6 @@ ;;; Code: -(require 'poem) - (eval-when-compile (require 'ccl)) (require 'broken) @@ -50,6 +48,26 @@ (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) "\ @@ -82,8 +100,7 @@ CODING-SYSTEM, DECODER and ENCODER must be symbol." (defun ccl-execute (ccl-prog reg) "\ Execute CCL-PROG with registers initialized by REGISTERS. -If CCL-PROG is symbol, it is dereferenced. -\[Emacs 20.3 emulating function]" +If CCL-PROG is symbol, it is dereferenced." (ccl-vector-program-execute (if (symbolp ccl-prog) (symbol-value ccl-prog) ccl-prog) reg))) @@ -94,8 +111,7 @@ If CCL-PROG is symbol, it is dereferenced. (defun ccl-execute-on-string (ccl-prog status string &optional contin) "\ Execute CCL-PROG with initial STATUS on STRING. -If CCL-PROG is symbol, it is dereferenced. -\[Emacs 20.3 emulating function]" +If CCL-PROG is symbol, it is dereferenced." (ccl-vector-program-execute-on-string (if (symbolp ccl-prog) (symbol-value ccl-prog) ccl-prog) status string contin))) @@ -116,19 +132,19 @@ If CCL-PROG is symbol, it is dereferenced. ) (broken-facility ccl-execute-eof-block-on-encoding-null - "Emacs forgets executing CCL_EOF_BLOCK with encoding on empty input." + "Emacs forgets executing CCL_EOF_BLOCK with encoding on empty input. (Fixed on Emacs 20.4)" (equal (encode-coding-string "" 'test-ccl-eof-block-cs) "[EOF]")) (broken-facility ccl-execute-eof-block-on-encoding-some - "Emacs forgets executing CCL_EOF_BLOCK with encoding on non-empty input." + "Emacs forgets executing CCL_EOF_BLOCK with encoding on non-empty input. (Fixed on Emacs 20.3)" (equal (encode-coding-string "a" 'test-ccl-eof-block-cs) "a[EOF]")) (broken-facility ccl-execute-eof-block-on-decoding-null - "Emacs forgets executing CCL_EOF_BLOCK with decoding on empty input." + "Emacs forgets executing CCL_EOF_BLOCK with decoding on empty input. (Fixed on Emacs 20.4)" (equal (decode-coding-string "" 'test-ccl-eof-block-cs) "[EOF]")) (broken-facility ccl-execute-eof-block-on-decoding-some - "Emacs forgets executing CCL_EOF_BLOCK with decoding on non-empty input." + "Emacs forgets executing CCL_EOF_BLOCK with decoding on non-empty input. (Fixed on Emacs 20.4)" (equal (decode-coding-string "a" 'test-ccl-eof-block-cs) "a[EOF]")) (broken-facility ccl-execute-eof-block-on-encoding @@ -153,6 +169,7 @@ If CCL-PROG is symbol, it is dereferenced. ;;; @ end ;;; -(provide 'pccl-20) +(require 'product) +(product-provide (provide 'pccl-20) (require 'apel-ver)) ;;; pccl-20.el ends here