From: tomo Date: Tue, 19 Dec 2000 06:19:08 +0000 (+0000) Subject: Sync with semi21-1_14_0-pre4-2. X-Git-Tag: flim-1_14_0~32 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c24ae6d35282d7b2451761f46e5c87f11f85a38e;p=elisp%2Fflim.git Sync with semi21-1_14_0-pre4-2. --- diff --git a/ChangeLog b/ChangeLog index 4a55870..aac7537 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,33 @@ +2000-12-17 MORIOKA Tomohiko + + * mel-g.el (gzip64-external-encode-region): Don't use + `as-binary-process'; comment out code to regularize line break + code for OS/2 [if it is needed, it is better to implement by + coding-system]. + (gzip64-external-decode-region): Don't use `as-binary-process'. + (mime-write-decoded-region): Likewise. + + * mime-parse.el: Require `luna'. + 2000-12-16 MORIOKA Tomohiko + * eword-encode.el (eword-encode-divide-into-charset-words): Use + `aref' instead of `sref'. + (ew-encode-rword-1): Use `1+' instead of `char-next-index'. + (eword-encode-phrase-to-rword-list): Use `find-charset-string' + instead of `find-non-ascii-charset-string'. + (eword-encode-addr-seq-to-rword-list): Don't use `butlast'. + (eword-encode-header): Use `find-charset-region' instead of + `find-non-ascii-charset-string'. + + * mel.el: Require `raw-io'. + + * mime-def.el (binary-insert-file-contents): Moved to raw-io.el. + (binary-write-region): Likewise. + + * mmbabyl.el (mime-write-entity): Use `raw-message-write-region' + instead of `write-region-as-raw-text-CRLF'. + * raw-io.el: New file. * smtpmail.el: - Require `raw-io'. @@ -17,6 +45,14 @@ initial value. (qmtp-send-buffer): Don't guard as `binary'. +2000-12-15 MORIOKA Tomohiko + + * mime/eword-decode.el: Don't use + `define-obsolete-function-alias'; so `eword-decode-header' is + deleted. + + * mime/mmexternal.el: Don't require `pces'. + 2000-12-15 TAKAHASHI Kaoru * Makefile (tar): Use `cvs tag -R' instead of `cvs tag -RF'. diff --git a/eword-decode.el b/eword-decode.el index 7a11ec3..108b284 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -505,8 +505,8 @@ If SEPARATOR is not nil, it is used as header separator." )) code-conversion)) -(define-obsolete-function-alias 'eword-decode-header - 'mime-decode-header-in-buffer) +;; (define-obsolete-function-alias 'eword-decode-header +;; 'mime-decode-header-in-buffer) ;;; @ encoded-word decoder diff --git a/eword-encode.el b/eword-encode.el index 0436357..c4cde05 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -119,13 +119,15 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (let ((len (length string)) dest) (while (> len 0) - (let* ((chr (sref string 0)) + (let* ((chr (aref string 0)) + ;; (chr (sref string 0)) (charset (eword-encode-char-type chr)) (i 1) ;; (i (char-length chr)) ) (while (and (< i len) - (setq chr (sref string i)) + (setq chr (aref string i)) + ;; (setq chr (sref string i)) (eq charset (eword-encode-char-type chr))) (setq i (1+ i)) ;; (setq i (char-next-index chr i)) @@ -312,7 +314,8 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (str "") nstr) (while (and (< p len) (progn - (setq np (char-next-index (sref string p) p)) + (setq np (1+ p)) + ;;(setq np (char-next-index (sref string p) p)) (setq nstr (substring string 0 np)) (setq ret (tm-eword::encoded-word-length (cons nstr (cdr rword)) @@ -401,7 +404,7 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (append dest (list (let ((ret (ew-find-charset-rule - (find-non-ascii-charset-string str)))) + (find-charset-string str)))) (make-ew-rword str (car ret)(nth 1 ret) 'phrase) ) @@ -464,7 +467,8 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (if (or (eq pname 'spaces) (eq pname 'comment)) (nconc dest (list (list (cdr token) nil nil))) - (nconc (butlast dest) + (nconc (nreverse (cdr (reverse dest))) + ;; (butlast dest) (list (list (concat (car (car (last dest))) (cdr token)) @@ -688,7 +692,7 @@ It refer variable `eword-field-encoding-method-alist'." (setq bbeg (match-end 0) field-name (buffer-substring (match-beginning 0) (1- bbeg)) end (std11-field-end)) - (and (find-non-ascii-charset-region bbeg end) + (and (delq 'ascii (find-charset-region bbeg end)) (let ((method (eword-find-field-encoding-method (downcase field-name)))) (cond ((eq method 'mime) diff --git a/mel-g.el b/mel-g.el index 16a37fd..9f79197 100644 --- a/mel-g.el +++ b/mel-g.el @@ -59,25 +59,26 @@ (defun gzip64-external-encode-region (beg end) (interactive "*r") (save-excursion - (as-binary-process - (apply (function call-process-region) - beg end (car gzip64-external-encoder) - t t nil - (cdr gzip64-external-encoder))) + (let ((coding-system-for-write 'binary)) + (apply (function call-process-region) + beg end (car gzip64-external-encoder) + t t nil + (cdr gzip64-external-encoder))) ;; for OS/2 ;; regularize line break code - (goto-char (point-min)) - (while (re-search-forward "\r$" nil t) - (replace-match "")))) + ;;(goto-char (point-min)) + ;;(while (re-search-forward "\r$" nil t) + ;; (replace-match "")) + )) (defun gzip64-external-decode-region (beg end) (interactive "*r") (save-excursion - (as-binary-process - (apply (function call-process-region) - beg end (car gzip64-external-decoder) - t t nil - (cdr gzip64-external-decoder))))) + (let ((coding-system-for-read 'binary)) + (apply (function call-process-region) + beg end (car gzip64-external-decoder) + t t nil + (cdr gzip64-external-decoder))))) (mel-define-method-function (mime-encode-region start end (nil "x-gzip64")) 'gzip64-external-encode-region) @@ -116,13 +117,14 @@ "Decode and write current region encoded by gzip64 into FILENAME. START and END are buffer positions." (interactive "*r\nFWrite decoded region to file: ") - (as-binary-process - (apply (function call-process-region) - start end (car gzip64-external-decoder) - nil nil nil - (let ((args (cdr gzip64-external-decoder))) - (append (butlast args) - (list (concat (car (last args)) ">" filename))))))) + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (apply (function call-process-region) + start end (car gzip64-external-decoder) + nil nil nil + (let ((args (cdr gzip64-external-decoder))) + (append (butlast args) + (list (concat (car (last args)) ">" filename))))))) ;;; @ end diff --git a/mel.el b/mel.el index 7df86fd..6306d2f 100644 --- a/mel.el +++ b/mel.el @@ -26,6 +26,7 @@ ;;; Code: (require 'mime-def) +(require 'raw-io) (require 'alist) (defcustom mime-encoding-list diff --git a/mime-def.el b/mime-def.el index 66dfa00..74158ec 100644 --- a/mime-def.el +++ b/mime-def.el @@ -77,23 +77,6 @@ (defsubst regexp-or (&rest args) (concat "\\(" (mapconcat (function identity) args "\\|") "\\)")) -(eval-when-compile (require 'static)) - -(static-if (and (featurep 'xemacs) - (not (featurep 'utf-2000))) - (progn - (require 'pces) - (defalias 'binary-insert-file-contents 'insert-file-contents-as-binary) - (defalias 'binary-write-region 'write-region-as-binary)) - (defalias 'binary-insert-file-contents 'insert-file-contents-literally) - (defun binary-write-region (start end filename - &optional append visit lockname) - "Like `write-region', q.v., but don't encode." - (let ((coding-system-for-write 'binary) - jka-compr-compression-info-list jam-zcat-filename-list) - (write-region start end filename append visit lockname))) - ) - (or (fboundp 'char-int) (defalias 'char-int 'identity)) diff --git a/mime-parse.el b/mime-parse.el index 4aeb30c..2323fba 100644 --- a/mime-parse.el +++ b/mime-parse.el @@ -25,6 +25,7 @@ ;;; Code: (require 'mime-def) +(require 'luna) (require 'std11) (autoload 'mime-entity-body-buffer "mime") diff --git a/mmexternal.el b/mmexternal.el index 90f838f..dde1406 100644 --- a/mmexternal.el +++ b/mmexternal.el @@ -26,7 +26,6 @@ (require 'mmgeneric) (require 'mime) -(require 'pces) (eval-and-compile (luna-define-class mime-external-entity (mime-entity)