From fee15ae1097e502bb1320e5b14be10027b248bf8 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 13 Nov 1998 13:27:01 +0000 Subject: [PATCH] * pccl.el: Enclose mule depended process by `unless-broken'. --- ChangeLog | 4 ++++ pccl.el | 65 +++++++++++++++++++++++++++++++++---------------------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b7ce17..2cc1b3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1998-11-13 Tanaka Akira + + * pccl.el: Enclose mule depended process by `unless-broken'. + 1998-11-13 MORIOKA Tomohiko * poe.el (defun-maybe-cond): fixed problem in Emacs 18. diff --git a/pccl.el b/pccl.el index 03e3d86..b7ba56f 100644 --- a/pccl.el +++ b/pccl.el @@ -24,21 +24,10 @@ ;;; Code: -(require 'ccl) -(require 'advice) (require 'broken) -(if (featurep 'mule) - (if (featurep 'xemacs) - (if (>= emacs-major-version 21) - ;; for XEmacs-21-mule - (require 'pccl-20)) - (if (>= emacs-major-version 20) - ;; for Emacs 20 - (require 'pccl-20) - ;; for MULE 1.* and 2.* - (require 'pccl-om)))) - +;; The condition for non-XEmacs mule t may be wrong. +;; But I don't know exact version which introduce CCL on mule. (broken-facility ccl-usable "Emacs has CCL." (and (featurep 'mule) @@ -46,23 +35,39 @@ (>= emacs-major-version 21) t))) -(defadvice define-ccl-program - (before accept-long-ccl-program activate) - "When CCL-PROGRAM is too long, internal buffer is lengthened." - (let ((try-ccl-compile t) - (prog (eval (ad-get-arg 1)))) - (ad-set-arg 1 (` '(, prog))) - (while try-ccl-compile - (setq try-ccl-compile nil) - (condition-case sig - (ccl-compile prog) - (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)))))))) +(unless-broken ccl-usable + (require 'ccl) + (require 'advice) + + (if (featurep 'mule) + (if (featurep 'xemacs) + (if (>= emacs-major-version 21) + ;; for XEmacs-21-mule + (require 'pccl-20)) + (if (>= emacs-major-version 20) + ;; for Emacs 20 + (require 'pccl-20) + ;; for MULE 1.* and 2.* + (require 'pccl-om)))) + + (defadvice define-ccl-program + (before accept-long-ccl-program activate) + "When CCL-PROGRAM is too long, internal buffer is extended automaticaly." + (let ((try-ccl-compile t) + (prog (eval (ad-get-arg 1)))) + (ad-set-arg 1 (` '(, prog))) + (while try-ccl-compile + (setq try-ccl-compile nil) + (condition-case sig + (ccl-compile prog) + (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)))))))) + ) ;;; @ end -- 1.7.10.4