+2000-12-17 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * 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 <tomo@kanji.zinbun.kyoto-u.ac.jp>
+ * 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'.
initial value.
(qmtp-send-buffer): Don't guard as `binary'.
+2000-12-15 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * 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 <kaoru@kaisei.org>
* Makefile (tar): Use `cvs tag -R' instead of `cvs tag -RF'.
))
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
(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))
(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))
(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)
)
(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))
(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)
(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)
"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
;;; Code:
(require 'mime-def)
+(require 'raw-io)
(require 'alist)
(defcustom mime-encoding-list
(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))
;;; Code:
(require 'mime-def)
+(require 'luna)
(require 'std11)
(autoload 'mime-entity-body-buffer "mime")
(require 'mmgeneric)
(require 'mime)
-(require 'pces)
(eval-and-compile
(luna-define-class mime-external-entity (mime-entity)