From: yamaoka Date: Fri, 29 Aug 2003 04:52:54 +0000 (+0000) Subject: Synch to Gnus 200308290458. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9fdd2f759ecca8e4511290dbfe56e2ebbf162393;p=elisp%2Fgnus.git- Synch to Gnus 200308290458. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 886e7b6..0756435 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-08-29 Katsumi Yamaoka + + * 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 * mm-decode.el (mm-remove-part): Try to kill external displayers diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index e1c113e..73ecadd 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -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."