# HG changeset patch # User Richard M. Stallman # Date 834159465 0 # Node ID fdc10603ac356022c254fd51009ff16745da0042 # Parent 8d78b06fbb46cde3413bbbbe995def0ea84e7c9c (rmail-get-new-mail): If conversion to BABYL fails for the default inboxes, rename them so they won't be tried again. diff -r 8d78b06fbb46 -r fdc10603ac35 lisp/mail/rmail.el --- a/lisp/mail/rmail.el Fri Jun 07 14:57:04 1996 +0000 +++ b/lisp/mail/rmail.el Fri Jun 07 14:57:45 1996 +0000 @@ -899,7 +899,8 @@ (make-backup-files (and make-backup-files (buffer-modified-p))) (buffer-read-only nil) ;; Don't make undo records for what we do in getting mail. - (buffer-undo-list t)) + (buffer-undo-list t) + success) (goto-char (point-max)) (skip-chars-backward " \t\n") ; just in case of brain damage (delete-region (point) (point-max)) ; caused by require-final-newline @@ -914,8 +915,22 @@ (setq delete-files (rmail-insert-inbox-text rmail-inbox-list t))) ;; Scan the new text and convert each message to babyl format. (goto-char (point-min)) - (save-excursion - (setq new-messages (rmail-convert-to-babyl-format))) + (unwind-protect + (save-excursion + (setq new-messages (rmail-convert-to-babyl-format) + success t)) + ;; If we could not convert the file's inboxes, + ;; rename the files we tried to read + ;; so we won't over and over again. + (if (and (not file-name) (not success)) + (let ((files delete-files) + (count 0)) + (while files + (while (file-exists-p (format "RMAILOSE.%d" count)) + (setq count (1+ count))) + (rename-file (car files) + (format "RMAILOSE.%d" count)) + (setq files (cdr files)))))) (or (zerop new-messages) (let (success) (widen)