Encode FCC stuff.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 30 Jun 2000 14:28:14 +0000 (14:28 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 30 Jun 2000 14:28:14 +0000 (14:28 +0000)
lisp/ChangeLog
lisp/message.el

index d64eee9..f97c081 100644 (file)
@@ -1,3 +1,7 @@
+2000-07-01 10:23:08  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * message.el (message-do-fcc): Encode MIME.
+
 2000-06-28 13:52:57  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * lpath.el: Fbind image-size.
index 3c8af00..015f9c8 100644 (file)
@@ -2816,9 +2816,19 @@ to find out how to use this."
        (while (setq file (message-fetch-field "fcc"))
          (push file list)
          (message-remove-header "fcc" nil t)))
+      (message-encode-message-body)
+      (save-restriction
+       (message-narrow-to-headers)
+       (let ((mail-parse-charset message-default-charset)
+             (rfc2047-header-encoding-alist
+              (cons '("Newsgroups" . default)
+                    rfc2047-header-encoding-alist)))
+         (mail-encode-encoded-word-buffer)))
       (goto-char (point-min))
-      (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
-      (replace-match "" t t)
+      (when (re-search-forward
+            (concat "^" (regexp-quote mail-header-separator) "$")
+            nil t)
+       (replace-match "" t t ))
       ;; Process FCC operations.
       (while list
        (setq file (pop list))
@@ -2838,7 +2848,6 @@ to find out how to use this."
                (rmail-output file 1 nil t)
              (let ((mail-use-rfc822 t))
                (rmail-output file 1 t t))))))
-
       (kill-buffer (current-buffer)))))
 
 (defun message-output (filename)