diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-02-24 11:40:04 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-02-24 11:40:04 -0500 |
commit | 86f5c0343d53ede798550e70ba66bd4610584126 (patch) | |
tree | c9a87e55afdfb6e57a0f03c99dc90d6b7f38c331 | |
parent | f95a5fd02f33b3002d98745396efa4097c616300 (diff) | |
download | emacs-86f5c0343d53ede798550e70ba66bd4610584126.tar.gz |
(gnus-treat-display-x-face): Protect against errors (bug#5299).
-rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/gnus/gnus-art.el | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index de564bb8c80..7ab323d74d4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2010-02-24 Stefan Monnier <monnier@iro.umontreal.ca> + + * 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 <rgm@gnu.org> * message.el (message-smtpmail-send-it) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index d01b9f3eb08..1a66404f841 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1422,8 +1422,12 @@ predicate. See Info node `(gnus)Customizing Articles'." (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'. |