Function: gnus-display-x-face-in-from

gnus-display-x-face-in-from is an autoloaded and byte-compiled function defined in gnus-fun.el.gz.

Signature

(gnus-display-x-face-in-from DATA)

Documentation

Display the X-Face DATA in the From header.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-fun.el.gz
(defun gnus-display-x-face-in-from (data)
  "Display the X-Face DATA in the From header."
  (require 'gnus-art)
  (let (pbm)
    (when (or (gnus-image-type-available-p 'xface)
	      (and (gnus-image-type-available-p 'pbm)
		   (setq pbm (uncompface data))))
      (save-excursion
	(save-restriction
	  (article-narrow-to-head)
	  (gnus-article-goto-header "from")
	  (when (bobp)
	    (insert "From: [no 'from' set]\n")
	    (forward-char -17))
	  (gnus-add-image
	   'xface
	   (gnus-put-image
	    (if (gnus-image-type-available-p 'xface)
		(apply #'gnus-create-image (concat "X-Face: " data) 'xface t
		       (cdr (assq 'xface gnus-face-properties-alist)))
	      (apply #'gnus-create-image pbm 'pbm t
		     (cdr (assq 'pbm gnus-face-properties-alist))))
	    nil 'xface))
	  (gnus-add-wash-type 'xface))))))