Synch to Gnus 200308290458.
authoryamaoka <yamaoka>
Fri, 29 Aug 2003 04:52:54 +0000 (04:52 +0000)
committeryamaoka <yamaoka>
Fri, 29 Aug 2003 04:52:54 +0000 (04:52 +0000)
lisp/ChangeLog
lisp/gnus-art.el

index 886e7b6..0756435 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-29  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (article-display-x-face): Make it possible to set
+       the gnus-article-x-face-command variable to the lambda form.
+
 2003-08-27  Simon Josefsson  <jas@extundo.com>
 
        * mm-decode.el (mm-remove-part): Try to kill external displayers
index e1c113e..73ecadd 100644 (file)
@@ -2220,23 +2220,25 @@ unfolded."
                               (not (string-match gnus-article-x-face-too-ugly
                                                  from)))))
            ;; We display the face.
-           (if (symbolp gnus-article-x-face-command)
-               ;; The command is a lisp function, so we call it.
-               (if (functionp gnus-article-x-face-command)
-                   (funcall gnus-article-x-face-command face)
-                 (error "%s is not a function" gnus-article-x-face-command))
-             ;; The command is a string, so we interpret the command
-             ;; as a, well, command, and fork it off.
-             (let ((process-connection-type nil))
-               (process-kill-without-query
-                (start-process
-                 "article-x-face" nil shell-file-name shell-command-switch
-                 gnus-article-x-face-command))
-               (with-temp-buffer
-                 (insert face)
-                 (process-send-region "article-x-face"
-                                      (point-min) (point-max)))
-               (process-send-eof "article-x-face")))))))))
+           (cond ((stringp gnus-article-x-face-command)
+                  ;; The command is a string, so we interpret the command
+                  ;; as a, well, command, and fork it off.
+                  (let ((process-connection-type nil))
+                    (process-kill-without-query
+                     (start-process
+                      "article-x-face" nil shell-file-name
+                      shell-command-switch gnus-article-x-face-command))
+                    (with-temp-buffer
+                      (insert face)
+                      (process-send-region "article-x-face"
+                                           (point-min) (point-max)))
+                    (process-send-eof "article-x-face")))
+                 ((functionp gnus-article-x-face-command)
+                  ;; The command is a lisp function, so we call it.
+                  (funcall gnus-article-x-face-command face))
+                 (t
+                  (error "%s is not a function"
+                         gnus-article-x-face-command)))))))))
 
 (defun article-decode-mime-words ()
   "Decode all MIME-encoded words in the article."