Synch to No Gnus 200506300317.
authoryamaoka <yamaoka>
Thu, 30 Jun 2005 03:18:07 +0000 (03:18 +0000)
committeryamaoka <yamaoka>
Thu, 30 Jun 2005 03:18:07 +0000 (03:18 +0000)
lisp/ChangeLog
lisp/gnus-art.el

index 866892a..b191230 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-30  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (article-display-face): Correct the position in
+       which Faces are inserted.
+
 2005-06-29  Didier Verna  <didier@xemacs.org>
 
        * gnus-art.el (article-display-face): display faces in correct
index 039364c..930f752 100644 (file)
@@ -2283,7 +2283,8 @@ unfolded."
       ;; read-only.
       (if (and wash-face-p (memq 'face gnus-article-wash-types))
          (gnus-delete-images 'face)
-       (let (face faces)
+       (let ((from (gnus-article-goto-header "from"))
+             face faces)
          (save-excursion
            (when (and wash-face-p
                       (progn
@@ -2294,22 +2295,23 @@ unfolded."
            (save-restriction
              (mail-narrow-to-head)
              (while (gnus-article-goto-header "Face")
-               (setq faces (push (mail-header-field-value) faces)))))
-         (dolist (face faces)
-           (let ((png (gnus-convert-face-to-png face))
-                 image)
-             (when png
-               (setq image
-                     (apply 'gnus-create-image png 'png t
-                            (cdr (assq 'png gnus-face-properties-alist))))
-               (gnus-article-goto-header "from")
-               (when (bobp)
-                 (insert "From: [no `from' set]\n")
-                 (forward-char -17))
-               (gnus-add-wash-type 'face)
-               (gnus-add-image 'face image)
-               (gnus-put-image image nil 'face))))))
-      )))
+               (push (mail-header-field-value) faces))))
+         (when faces
+           (unless from
+             (insert "From:")
+             (setq from (point))
+             (insert "[no `from' set]\n"))
+           (dolist (face faces)
+             (let ((png (gnus-convert-face-to-png face))
+                   image)
+               (when png
+                 (setq image
+                       (apply 'gnus-create-image png 'png t
+                              (cdr (assq 'png gnus-face-properties-alist))))
+                 (goto-char from)
+                 (gnus-add-wash-type 'face)
+                 (gnus-add-image 'face image)
+                 (gnus-put-image image nil 'face))))))))))
 
 (defun article-display-x-face (&optional force)
   "Look for an X-Face header and display it if present."