Function: rmail-revert

rmail-revert is a byte-compiled function defined in rmail.el.gz.

Signature

(rmail-revert ARG NOCONFIRM)

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
;; Handle M-x revert-buffer done in an rmail-mode buffer.
(defun rmail-revert (arg noconfirm)
  (set-buffer rmail-buffer)
  (let* ((revert-buffer-function (default-value 'revert-buffer-function))
	 (rmail-enable-multibyte enable-multibyte-characters)
	 ;; See similar code in `rmail'.
	 ;; FIXME needs updating?
	 (coding-system-for-read (and rmail-enable-multibyte 'raw-text))
	 (before-revert-hook 'rmail-swap-buffers-maybe))
    ;; Call our caller again, but this time it does the default thing.
    (when (revert-buffer arg noconfirm)
      ;; If the user said "yes", and we changed something,
      ;; reparse the messages.
      (set-buffer rmail-buffer)
      (rmail-mode-2)
      ;; Convert all or part to Babyl file if possible.
      (rmail-convert-file-maybe)
      ;; We have read the file as raw-text, so the buffer is set to
      ;; unibyte.  Make it multibyte if necessary.
      (if (and rmail-enable-multibyte
	       (not enable-multibyte-characters))
	  (set-buffer-multibyte t))
      (goto-char (point-max))
      (rmail-set-message-counters)
      (rmail-show-message rmail-total-messages)
      (run-hooks 'rmail-mode-hook))))