emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master eba8046 1/2: (message-do-fcc): Modernise the code s


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master eba8046 1/2: (message-do-fcc): Modernise the code slightly.
Date: Thu, 26 Jan 2017 20:39:32 +0000 (UTC)

branch: master
commit eba8046f05ca288608ebd065e089764275a503d2
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    (message-do-fcc): Modernise the code slightly.
    
    * lisp/gnus/message.el (message-do-fcc): Modernise the code slightly.
---
 lisp/gnus/message.el |   17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 9af38c0..7cff8b8 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -5393,15 +5393,11 @@ Otherwise, generate and save a value for 
`canlock-password' first."
   "Process Fcc headers in the current buffer."
   (let ((case-fold-search t)
        (buf (current-buffer))
-       list file
-       (mml-externalize-attachments message-fcc-externalize-attachments))
-    (save-excursion
-      (save-restriction
-       (message-narrow-to-headers)
-       (setq file (message-fetch-field "fcc" t)))
-      (when file
-       (set-buffer (get-buffer-create " *message temp*"))
-       (erase-buffer)
+       (mml-externalize-attachments message-fcc-externalize-attachments)
+       (file (message-field-value "fcc" t))
+       list)
+    (when file
+      (with-temp-buffer
        (insert-buffer-substring buf)
        (message-encode-message-body)
        (save-restriction
@@ -5442,8 +5438,7 @@ Otherwise, generate and save a value for 
`canlock-password' first."
              (if (and (file-readable-p file) (mail-file-babyl-p file))
                  (rmail-output file 1 nil t)
                (let ((mail-use-rfc822 t))
-                 (rmail-output file 1 t t))))))
-       (kill-buffer (current-buffer))))))
+                 (rmail-output file 1 t t))))))))))
 
 (defun message-output (filename)
   "Append this article to Unix/babyl mail file FILENAME."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]