From: akr Date: Thu, 12 Nov 1998 13:09:28 +0000 (+0000) Subject: * pccl.el (define-long-ccl-program): New macro. X-Git-Tag: apel-9_10~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=08d7f7e959562cdf09f3bd3de0b600ba51d5e49f;p=elisp%2Fapel.git * pccl.el (define-long-ccl-program): New macro. --- diff --git a/pccl.el b/pccl.el index 30e4356..0107a84 100644 --- a/pccl.el +++ b/pccl.el @@ -24,6 +24,7 @@ ;;; Code: +(require 'ccl) (require 'broken) (if (featurep 'mule) @@ -44,6 +45,23 @@ (>= emacs-major-version 21) t))) +(defmacro define-long-ccl-program (name ccl-program &optional doc) + "Define CCL program as define-ccl-program." + (setq ccl-program (eval ccl-program)) + (let ((try-ccl-compile t)) + (while try-ccl-compile + (setq try-ccl-compile nil) + (condition-case sig + (ccl-compile ccl-program) + (args-out-of-range + (if (and (eq (car (cdr sig)) ccl-program-vector) + (= (car (cdr (cdr sig))) (length ccl-program-vector))) + (setq ccl-program-vector + (make-vector (* 2 (length ccl-program-vector)) 0) + try-ccl-compile t) + (signal (car sig) (cdr sig)))))) + (` (define-ccl-program (, name) '(, ccl-program) (, doc))))) + ;;; @ end ;;;