diff lisp/gnus/gnus-art.el @ 107217:27eb4f088075

(gnus-treat-display-x-face): Protect against errors (bug#5299).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 24 Feb 2010 11:40:04 -0500
parents 1d1d5d9bd884
children 0fe940324254 376148b31b5e
line wrap: on
line diff
--- a/lisp/gnus/gnus-art.el	Wed Feb 24 10:30:49 2010 -0500
+++ b/lisp/gnus/gnus-art.el	Wed Feb 24 11:40:04 2010 -0500
@@ -1422,8 +1422,12 @@
        (gnus-image-type-available-p 'xbm)
        (if (featurep 'xemacs)
 	   (featurep 'xface)
-	 (and (string-match "^0x" (shell-command-to-string "uncompface"))
-	      (executable-find "icontopbm")))
+	 (condition-case nil
+             (and (string-match "^0x" (shell-command-to-string "uncompface"))
+                  (executable-find "icontopbm"))
+           ;; shell-command-to-string may signal an error, e.g. if
+           ;; shell-file-name is not found.
+           (error nil)))
        'head)
   "Display X-Face headers.
 Valid values are nil and `head'.