# HG changeset patch # User Stefan Monnier # Date 1267029604 18000 # Node ID 27eb4f0880755de8de46eb7ea506e6825066885d # Parent f824258be7d139456555c8da5a5841fe238e648e (gnus-treat-display-x-face): Protect against errors (bug#5299). diff -r f824258be7d1 -r 27eb4f088075 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Wed Feb 24 10:30:49 2010 -0500 +++ b/lisp/gnus/ChangeLog Wed Feb 24 11:40:04 2010 -0500 @@ -1,3 +1,8 @@ +2010-02-24 Stefan Monnier + + * gnus-art.el (gnus-treat-display-x-face): Don't burp if + shell-command-to-string signals an error (bug#5299). + 2010-02-24 Glenn Morris * message.el (message-smtpmail-send-it) diff -r f824258be7d1 -r 27eb4f088075 lisp/gnus/gnus-art.el --- 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'.