2001-01-16 Katsumi Yamaoka <yamaoka@jpl.org>
[gnus] / lisp / gnus-art.el
index 3fac696..43c03ec 100644 (file)
@@ -1543,11 +1543,26 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")."
       (delete-process "article-x-face"))
     (let ((inhibit-point-motion-hooks t)
          (case-fold-search t)
+         (x-faces "")
          from last)
+      (when (gnus-buffer-live-p gnus-original-article-buffer)
+       (with-current-buffer gnus-original-article-buffer
+         (save-restriction
+           (article-narrow-to-head)
+           (while (re-search-forward "^X-Face:" nil t)
+             (setq x-faces
+                   (concat
+                    x-faces
+                    (buffer-substring (match-beginning 0)
+                                      (1- (re-search-forward
+                                           "^\\($\\|[^ \t]\\)" nil t)))))))))
       (save-restriction
        (article-narrow-to-head)
-       (goto-char (point-min))
        (setq from (message-fetch-field "from"))
+       (when (gnus-buffer-live-p gnus-original-article-buffer)
+         (message-remove-header "X-Face")
+         (goto-char (point-min))
+         (insert x-faces))
        (goto-char (point-min))
        (while (and gnus-article-x-face-command
                    (not last)
@@ -1558,7 +1573,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")."
                             (not (string-match gnus-article-x-face-too-ugly
                                                from))))
                    ;; Has to be present.
-                   (re-search-forward "^X-Face: " nil t))
+                   (re-search-forward "^X-Face:[\t ]*" nil t))
          ;; This used to try to do multiple faces (`while' instead of
          ;; `when' above), but (a) sending multiple EOFs to xv doesn't
          ;; work (b) it can crash some versions of Emacs (c) are
@@ -2259,7 +2274,7 @@ should replace the \"Date:\" one, or should be added below it."
         (number-to-string (nth 3 dtime))
         (let ((digit (% (nth 3 dtime) 10)))
           (cond
-           ((memq (nth 3 dtime) '(11 12)) "th")
+           ((memq (nth 3 dtime) '(11 12 13)) "th")
            ((= digit 1) "st")
            ((= digit 2) "nd")
            ((= digit 3) "rd")