Function: gnus-summary-display-article

gnus-summary-display-article is a byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-summary-display-article ARTICLE &optional ALL-HEADER)

Documentation

Display ARTICLE in article buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-display-article (article &optional all-header)
  "Display ARTICLE in article buffer."
  (unless (and (gnus-buffer-live-p gnus-article-buffer)
	       (with-current-buffer gnus-article-buffer
		 (derived-mode-p 'gnus-article-mode)))
    (gnus-article-setup-buffer))
  (gnus-set-global-variables)
  (with-current-buffer gnus-article-buffer
    ;; The buffer may be non-empty and even narrowed, so go back to
    ;; a sane state.
    (widen)
    ;; We're going to erase the buffer anyway so do it now: it can save us from
    ;; uselessly performing multibyte-conversion of the current content.
    (let ((inhibit-read-only t)) (erase-buffer))
    (setq gnus-article-charset gnus-newsgroup-charset)
    (setq gnus-article-ignored-charsets gnus-newsgroup-ignored-charsets)
    (mm-enable-multibyte))
  (if (null article)
      nil
    (prog1
	(funcall (or gnus-summary-display-article-function
                     #'gnus-article-prepare)
                 article all-header)
      (gnus-run-hooks 'gnus-select-article-hook)
      (when (and gnus-current-article
		 (not (zerop gnus-current-article)))
	(gnus-summary-goto-subject gnus-current-article))
      (gnus-summary-recenter)
      (when (and gnus-use-trees gnus-show-threads)
	(gnus-possibly-generate-tree article)
	(gnus-highlight-selected-tree article))
      ;; Successfully display article.
      (gnus-article-set-window-start
       (cdr (assq article gnus-newsgroup-bookmarks))))))