From 2ddccdc0a624dce45daf4baf290de59a14f9d01a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 3 Oct 2004 01:21:55 +0000 Subject: [PATCH] (rmail): Convert Babyl files using decode-babyl-file. (rmail-use-spam-filter): Add defvar. --- lisp/ChangeLog | 11 +++++++++++ lisp/mail/rmail.el | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f6dda2bbc6..74a45d9bfdd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2004-10-02 Richard M. Stallman + + * mail/rmail.el (rmail): Convert Babyl files using decode-babyl-file. + (rmail-use-spam-filter): Add defvar. + + * mail/unrmail.el: Mostly rewritten. Parses the file + directly without calling any functions in Rmail. + (batch-convert-babyl, convert-babyl-file, decode-babyl-file) + (decode-babyl): New functions. + (unrmail, batch-unrmail): Now aliases. + 2004-09-27 Richard M. Stallman * mail/rmaildesc.el (rmail-message-deleted-p): Add as alias. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index fe6805c8de6..bba3f24ccbf 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -598,6 +598,9 @@ The first parenthesized expression should match the MIME-charset name.") (defvar rmail-enable-multibyte nil) +;; Avoid errors. +(defvar rmail-use-spam-filter nil) + ;;; mbox don't care (defun rmail-require-mime-maybe () "Require `rmail-mime-feature' if that is non-nil. @@ -674,9 +677,10 @@ If `rmail-display-summary' is non-nil, make a summary for this RMAIL file." (setq run-mail-hook t) (rmail-mode-2) (goto-char (point-min)) - ;; If file starts like a Babyl file, reject it. - (if (looking-at "BABYL OPTIONS:") - (error "This is a BABYL file; use M-x unrmail to convert it")) + ;; If file starts like a Babyl file, convert it. + (when (looking-at "BABYL OPTIONS:") + (erase-buffer) + (decode-babyl-file file-name)) (goto-char (point-max))) ;; As we have read a file by raw-text, the buffer is set to ;; unibyte. We must make it multibyte if necessary. -- 2.39.2