Function: gnus-picon-transform-newsgroups

gnus-picon-transform-newsgroups is an interactive and byte-compiled function defined in gnus-picon.el.gz.

Signature

(gnus-picon-transform-newsgroups HEADER)

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-picon.el.gz
(defun gnus-picon-transform-newsgroups (header)
  (interactive nil gnus-article-mode gnus-summary-mode)
  (gnus-with-article-headers
   (gnus-article-goto-header header)
   (mail-header-narrow-to-field)
   (let ((groups (message-tokenize-header (mail-fetch-field header)))
	 spec file) ;; point
     (dolist (group groups)
       (unless (setq spec (cdr (assoc group gnus-picon-cache)))
	 (setq spec (nreverse (split-string group "[.]")))
	 (dotimes (i (length spec))
	   (when (setq file (gnus-picon-find-face
			     (concat "unknown@"
				     (mapconcat
				      #'identity (nthcdr i spec) "."))
			     gnus-picon-news-directories t))
	     (setcar (nthcdr i spec)
		     (cons (gnus-picon-create-glyph file)
			   (nth i spec)))))
	 (push (cons group spec) gnus-picon-cache))
       (when (search-forward group nil t)
	 (delete-region (match-beginning 0) (match-end 0))
	 (save-restriction
	   (narrow-to-region (point) (point))
	   (while spec
	     (goto-char (point-min))
	     (if (> (length spec) 1)
		 (insert "."))
	     (gnus-picon-insert-glyph (pop spec) 'newsgroups-picon))
	   (goto-char (point-max))))))))