Function: gnus-article-treat-unfold-headers

gnus-article-treat-unfold-headers is an autoloaded, interactive and byte-compiled function defined in gnus-art.el.gz.

Signature

(gnus-article-treat-unfold-headers)

Documentation

Unfold folded message headers.

Only the headers that fit into the current window width will be unfolded.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun gnus-article-treat-unfold-headers ()
  "Unfold folded message headers.
Only the headers that fit into the current window width will be
unfolded."
  (interactive nil gnus-article-mode gnus-summary-mode)
  (gnus-with-article-headers
    (let (length)
      (while (not (eobp))
	(save-restriction
	  (mail-header-narrow-to-field)
	  (let* ((header (buffer-string))
		 (unfoldable
		  (or (equal gnus-article-unfold-long-headers t)
		      (and (stringp gnus-article-unfold-long-headers)
			   (string-match gnus-article-unfold-long-headers
					 header)))))
	    (with-temp-buffer
	      (insert header)
	      (goto-char (point-min))
	      (while (re-search-forward "\n[\t ]" nil t)
		(replace-match " " t t)))
	    (setq length (- (point-max) (point-min) 1))
	    (when (or unfoldable
		      (< length (window-width)))
	      (while (re-search-forward "\n[\t ]" nil t)
		(replace-match " " t t))))
	  (goto-char (point-max)))))))