--- gnus-art.el~ 2003-02-06 21:53:48 +0000 +++ gnus-art.el 2003-02-07 07:18:41 +0000 @@ -1931,6 +1931,14 @@ (gnus-add-image 'face image) (gnus-put-image image))))))) +(defvar gnus-article-preparing-faces-internal nil + "Internal variable used to say whether Face headers are being prepared.") + +(defun gnus-article-preparing-faces-done () + "Declare that preparing Face headers is done." + (remove-hook 'post-command-hook 'gnus-article-preparing-faces-done) + (setq gnus-article-preparing-faces-internal nil)) + (defun article-display-x-face (&optional force) "Look for an X-Face header and display it if present." (interactive (list 'force)) @@ -1939,11 +1947,14 @@ ;; Delete the old process, if any. (when (process-status "article-x-face") (delete-process "article-x-face")) - (if (memq 'xface gnus-article-wash-types) + (if (and (not gnus-article-preparing-faces-internal) + (memq 'xface gnus-article-wash-types)) ;; We have already displayed X-Faces, so we remove them ;; instead. (gnus-delete-images 'xface) ;; Display X-Faces. + (setq gnus-article-preparing-faces-internal t) + (add-hook 'post-command-hook 'gnus-article-preparing-faces-done) (let (x-faces from face) (save-excursion (when (and wash-face-p