Sync with semi21-1_14_0-pre4-2.
authortomo <tomo>
Tue, 19 Dec 2000 06:19:08 +0000 (06:19 +0000)
committertomo <tomo>
Tue, 19 Dec 2000 06:19:08 +0000 (06:19 +0000)
ChangeLog
eword-decode.el
eword-encode.el
mel-g.el
mel.el
mime-def.el
mime-parse.el
mmexternal.el

index 4a55870..aac7537 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,33 @@
+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>
 
 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'.
        * raw-io.el: New file.
 
        * smtpmail.el: - Require `raw-io'.
        initial value.
        (qmtp-send-buffer): Don't guard as `binary'.
 
        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'.
 2000-12-15  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * Makefile (tar): Use `cvs tag -R' instead of `cvs tag -RF'.
index 7a11ec3..108b284 100644 (file)
@@ -505,8 +505,8 @@ If SEPARATOR is not nil, it is used as header separator."
        ))
    code-conversion))
 
        ))
    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
 
 
 ;;; @ encoded-word decoder
index 0436357..c4cde05 100644 (file)
@@ -119,13 +119,15 @@ MODE is allows `text', `comment', `phrase' or nil.  Default value is
   (let ((len (length string))
        dest)
     (while (> len 0)
   (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)
             (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))
                    (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
                      (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))
                               (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
                   (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)
                              )
                              (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)))
                     (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))
                              (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))
          (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)
               (let ((method (eword-find-field-encoding-method
                              (downcase field-name))))
                 (cond ((eq method 'mime)
index 16a37fd..9f79197 100644 (file)
--- a/mel-g.el
+++ b/mel-g.el
 (defun gzip64-external-encode-region (beg end)
   (interactive "*r")
   (save-excursion
 (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
     ;; 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
 
 (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)
 
 (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: ")
   "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
 
 
 ;;; @ end
diff --git a/mel.el b/mel.el
index 7df86fd..6306d2f 100644 (file)
--- a/mel.el
+++ b/mel.el
@@ -26,6 +26,7 @@
 ;;; Code:
 
 (require 'mime-def)
 ;;; Code:
 
 (require 'mime-def)
+(require 'raw-io)
 (require 'alist)
 
 (defcustom mime-encoding-list
 (require 'alist)
 
 (defcustom mime-encoding-list
index 66dfa00..74158ec 100644 (file)
 (defsubst regexp-or (&rest args)
   (concat "\\(" (mapconcat (function identity) args "\\|") "\\)"))
 
 (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))
 
 (or (fboundp 'char-int)
     (defalias 'char-int 'identity))
 
index 4aeb30c..2323fba 100644 (file)
@@ -25,6 +25,7 @@
 ;;; Code:
 
 (require 'mime-def)
 ;;; Code:
 
 (require 'mime-def)
+(require 'luna)
 (require 'std11)
 
 (autoload 'mime-entity-body-buffer "mime")
 (require 'std11)
 
 (autoload 'mime-entity-body-buffer "mime")
index 90f838f..dde1406 100644 (file)
@@ -26,7 +26,6 @@
 
 (require 'mmgeneric)
 (require 'mime)
 
 (require 'mmgeneric)
 (require 'mime)
-(require 'pces)
 
 (eval-and-compile
   (luna-define-class mime-external-entity (mime-entity)
 
 (eval-and-compile
   (luna-define-class mime-external-entity (mime-entity)