From aa8c69584f1dccdfff747a1d04c09febae30e183 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 31 Jan 2009 09:32:45 +0000 Subject: [PATCH] (rmail-convert-babyl-to-mbox): Set Rmail's buffer encoding to `raw-text-unix'. (rmail-perm-variables): Set encoding of rmail-view-buffer to `undecided-unix'. --- lisp/ChangeLog | 7 +++++++ lisp/mail/rmail.el | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 338a9eb23ef..f2ec713e393 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2009-01-31 Eli Zaretskii + + * mail/rmail.el (rmail-convert-babyl-to-mbox): Set Rmail's buffer + encoding to `raw-text-unix'. + (rmail-perm-variables): Set encoding of rmail-view-buffer to + `undecided-unix'. + 2009-01-31 Glenn Morris * mail/rmailsum.el (rmail-new-summary): Don't try to summarize an empty diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 22774ba3340..6651b3fc236 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -919,6 +919,9 @@ Convert Babyl mail file to mbox format? ") (coding-system-for-read 'raw-text)) (erase-buffer) (insert-file-contents new-file) + ;; Rmail buffers need to be saved with Unix EOLs, or else + ;; the format will not be recognized. + (set-buffer-file-coding-system 'raw-text-unix) (rmail-mode-1) (rmail-perm-variables) (rmail-variables) @@ -1296,7 +1299,9 @@ If so restore the actual mbox message collection." (setq rmail-view-buffer (rmail-generate-viewer-buffer)) (set-buffer rmail-view-buffer) (setq buffer-undo-list t) - (set-buffer-multibyte t)) + (set-buffer-multibyte t) + ;; Force C-x C-s write Unix EOLs. + (set-buffer-file-coding-system 'undecided-unix)) (make-local-variable 'rmail-summary-buffer) (make-local-variable 'rmail-summary-vector) (make-local-variable 'rmail-current-message) -- 2.39.2