* gnus-art.el (gnus-treat-display-grey-xface): New variable.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 8 Feb 2002 18:05:51 +0000 (18:05 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 8 Feb 2002 18:05:51 +0000 (18:05 +0000)
(article-display-x-face): Use it.  Disable grey xface, if
uncompface is not found.

lisp/ChangeLog
lisp/gnus-art.el

index e33785e..936bb95 100644 (file)
@@ -1,5 +1,9 @@
 2002-02-08  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
+       * gnus-art.el (gnus-treat-display-grey-xface): New variable.
+       (article-display-x-face): Use it.  Disable grey xface, if
+       uncompface is not found.
+
        * message.el (message-mode): Don't enable multibyte on an indirect
        buffer.
 
index 5de5d42..496d4b9 100644 (file)
@@ -1085,6 +1085,16 @@ See Info node `(gnus)Customizing Articles' and Info node
   :type gnus-article-treat-head-custom)
 (put 'gnus-treat-display-xface 'highlight t)
 
+(defcustom gnus-treat-display-grey-xface
+  (and (string-match "^0x" (shell-command-to-string "uncompface"))
+       t)
+  "Display grey X-Face headers.
+Valid values are nil, t."
+  :group 'gnus-article-treat
+  :version "21.3"
+  :type 'boolean)
+(put 'gnus-treat-display-grey-xface 'highlight t)
+
 (defcustom gnus-treat-display-smileys
   (if (or (and (featurep 'xemacs)
               (featurep 'xpm))
@@ -1838,10 +1848,14 @@ unfolded."
              (set-buffer gnus-original-article-buffer))
            (save-restriction
              (mail-narrow-to-head)
-             (while (gnus-article-goto-header "x-face\\(-[0-9]+\\)?")
-               (when (match-beginning 2)
-                 (setq grey t))
-               (push (mail-header-field-value) x-faces))
+             (let ((regexp
+                    (if gnus-treat-display-grey-xface
+                        "x-face\\(-[0-9]+\\)?"
+                      "x-face")))
+               (while (gnus-article-goto-header regexp)
+                 (when (match-beginning 2)
+                   (setq grey t))
+                 (push (mail-header-field-value) x-faces)))
              (setq from (message-fetch-field "from"))))
          (if grey
              (let ((xpm (gnus-convert-gray-x-face-to-xpm x-faces))