2006-01-18 Henrik Enberg <enberg@printf.se>
* rmail.el (rmail-get-inbox-list): New function.
- (rmail-get-new-mail): Use it. Only call `rmail-show-message'
- on file-error condition if no new messages are found.
+ (rmail-get-new-mail): Use it. Only call `rmail-show-message' on
+ file-error condition if no new messages are found.
(rmail-get-sender): Deleted.
(rmail-process-new-messages): Use mail-fetch-field instead.
(rmail-show-message): Cleanup.
-
(rmail-decode-mbox-file): New function.
(rmail): Use it. Only call `rmail-show-message' if no new mail was
found.
(get-buffer-create (file-name-nondirectory file-name)))
(when (file-exists-p file-name)
(insert-file-contents-literally file-name))
- (setq buffer-file-name file-name))
- ;; As we have read a file as raw-text, the buffer is set to
- ;; unibyte. We must make it multibyte if necessary.
- (if (and rmail-enable-multibyte
- (not enable-multibyte-characters))
- (set-buffer-multibyte t)))
+ (setq buffer-file-name file-name)
+ ;; As we have read a file as raw-text, the buffer is set to
+ ;; unibyte. We must make it multibyte if necessary.
+ (if (and rmail-enable-multibyte
+ (not enable-multibyte-characters))
+ (set-buffer-multibyte t))))
;; Make sure we're in rmail-mode, even if the buffer did exist and
;; the file was not changed.
(unless (eq major-mode 'rmail-mode)
(unless (memq coding-system '(undecided undecided-unix))
(set-buffer-modified-p t) ;; avoid locking when decoding
(let ((buffer-undo-list t))
- (decode-coding-region from to coding-system))
+ (decode-coding-region (point-min) (point-max) coding-system))
(setq coding-system last-coding-system-used))
(set-buffer-modified-p modifiedp)
(setq buffer-file-coding-system nil)