Function: article-hide-list-identifiers

article-hide-list-identifiers is an interactive and byte-compiled function defined in gnus-art.el.gz.

Signature

(article-hide-list-identifiers)

Documentation

Remove list identifiers from the Subject header.

The gnus-list-identifiers variable specifies what to do.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun article-hide-list-identifiers ()
  "Remove list identifiers from the Subject header.
The `gnus-list-identifiers' variable specifies what to do."
  (interactive nil gnus-article-mode)
  (let ((regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
        (inhibit-read-only t))
    (when regexp
      (save-excursion
	(save-restriction
	  (article-narrow-to-head)
	  (goto-char (point-min))
	  (while (re-search-forward
		  (concat "^Subject: +\\(R[Ee]: +\\)*\\(" regexp " *\\)")
		  nil t)
	    (delete-region (match-beginning 2) (match-end 0))
	    (beginning-of-line))
	  (when (re-search-forward
		 "^Subject: +\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" nil t)
	    (delete-region (match-beginning 1) (match-end 1))))))))