changeset 98707:9a09eaf25d36

(pmail): Check for babyl conversion early; ignore multibyte.
author Paul Reilly <pmr@pajato.com>
date Tue, 14 Oct 2008 12:08:21 +0000
parents 6d37ed9d93e0
children 0372d3155f43
files lisp/mail/pmail.el
diffstat 1 files changed, 7 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/pmail.el	Tue Oct 14 11:45:01 2008 +0000
+++ b/lisp/mail/pmail.el	Tue Oct 14 12:08:21 2008 +0000
@@ -875,22 +875,14 @@
     (setq pmail-buffers-swapped-p nil)
     (if (eq major-mode 'pmail-edit-mode)
 	(error "Exit Pmail Edit mode before getting new mail"))
-    (if (and existed (> (buffer-size) 0))
-	;; Buffer not new and not empty; ensure in proper mode, but that's all.
-	(or (eq major-mode 'pmail-mode)
-	    (progn (pmail-mode-2)
-		   (setq run-mail-hook t)))
-      (setq run-mail-hook t)
-      (pmail-mode-2)
-      (pmail-convert-file-maybe)
-      (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.
-    (if (and pmail-enable-multibyte
-	     (not enable-multibyte-characters))
-	(set-buffer-multibyte t))
-    ;; If necessary, scan to find all the messages.
+    ;; Insure that the Rmail file is in mbox format, the buffer is in
+    ;; Pmail mode and has been scanned to find all the messages.
+    (pmail-convert-file-maybe)
+    (unless (eq major-mode 'pmail-mode)
+      (pmail-mode-2))
+    (goto-char (point-max))
     (pmail-maybe-set-message-counters)
+    ;; Show the first unread message and process summary mode.
     (unwind-protect
 	(unless (and (not file-name-arg) (pmail-get-new-mail))
 	  (pmail-show-message-maybe (pmail-first-unseen-message)))