From 7ec891a71fc4bed563fe288eb01b8c2bb37ea5bf Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 16 Dec 1998 04:32:39 +0000 Subject: [PATCH] Move new coding systems to version specific features area. --- poem-om.el | 101 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 50 insertions(+), 51 deletions(-) diff --git a/poem-om.el b/poem-om.el index 710f1ce..e9dc6b1 100644 --- a/poem-om.el +++ b/poem-om.el @@ -47,6 +47,56 @@ pat (1+ (match-beginning 0)) (1- (match-end 0)))) 0)) )))) + + (define-ccl-program ccl-decode-raw-text + '(1 + ((read r1 r0) + (loop + (r2 = (r1 == ?\x0d)) + (r2 &= (r0 == ?\x0a)) + (if r2 + ((write ?\x0a) + (read r1 r0) + (repeat)) + ((write r1) + (r1 = (r0 + 0)) + (read r0) + (repeat) + )))) + (write r1)) + "Convert line-break code from CRLF to LF.") + + (define-ccl-program ccl-encode-raw-text + '(1 + ((read r0) + (loop (write-read-repeat r0)))) + "Pass through without any conversions.") + + (define-ccl-program ccl-encode-raw-text-CRLF + '(2 + ((loop + (read r0) + (if (r0 == ?\x0a) + (write "\x0d\x0a") + (write r0)) + (repeat)))) + "Convert line-break code from LF to CRLF.") + + (make-coding-system + 'raw-text 4 ?= + "No conversion" + nil + (cons ccl-decode-raw-text ccl-encode-raw-text)) + + (make-coding-system + 'raw-text-dos 4 ?= + "No conversion" + nil + (cons ccl-decode-raw-text ccl-encode-raw-text-CRLF)) + + (make-coding-system + 'binary nil ?= + "No conversion") )) @@ -115,57 +165,6 @@ (defalias 'set-buffer-file-coding-system 'set-file-coding-system) -(when (and (boundp 'MULE) running-emacs-19) - (define-ccl-program ccl-decode-raw-text - '(1 - ((read r1 r0) - (loop - (r2 = (r1 == ?\x0d)) - (r2 &= (r0 == ?\x0a)) - (if r2 - ((write ?\x0a) - (read r1 r0) - (repeat)) - ((write r1) - (r1 = (r0 + 0)) - (read r0) - (repeat) - )))) - (write r1)) - "Convert line-break code from CRLF to LF.") - - (define-ccl-program ccl-encode-raw-text - '(1 - ((read r0) - (loop (write-read-repeat r0)))) - "Pass through without any conversions.") - - (define-ccl-program ccl-encode-raw-text-CRLF - '(2 - ((loop - (read r0) - (if (r0 == ?\x0a) - (write "\x0d\x0a") - (write r0)) - (repeat)))) - "Convert line-break code from LF to CRLF.") - - (make-coding-system - 'raw-text 4 ?= - "No conversion" - nil - (cons ccl-decode-raw-text ccl-encode-raw-text)) - - (make-coding-system - 'raw-text-dos 4 ?= - "No conversion" - nil - (cons ccl-decode-raw-text ccl-encode-raw-text-CRLF)) - - (make-coding-system - 'binary nil ?= - "No conversion") - ) ;;; @ without code-conversion ;;; -- 1.7.10.4