Function: article-strip-banner

article-strip-banner is an interactive and byte-compiled function defined in gnus-art.el.gz.

Signature

(article-strip-banner)

Documentation

Strip the banners specified by the banner group parameter and by gnus-article-address-banner-alist.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun article-strip-banner ()
  "Strip the banners specified by the `banner' group parameter and by
`gnus-article-address-banner-alist'."
  (interactive nil gnus-article-mode)
  (save-excursion
    (save-restriction
      (when (gnus-parameter-banner gnus-newsgroup-name)
	(article-really-strip-banner
	 (gnus-parameter-banner gnus-newsgroup-name)))
      (when gnus-article-address-banner-alist
	;; Note that the From header is decoded here, so it is
	;; required that the *-extract-address-components function
	;; supports non-ASCII text.
	(let ((from (save-restriction
		      (widen)
		      (article-narrow-to-head)
		      (mail-fetch-field "from"))))
	  (when (and from
		     (setq from
			   (cadr (funcall gnus-extract-address-components
					  from))))
	    (catch 'found
	      (dolist (pair gnus-article-address-banner-alist)
		(when (string-match (car pair) from)
		  (throw 'found
			 (article-really-strip-banner (cdr pair))))))))))))