From cd16d1b9e3259c126a4e66e02777c4ddcf58ebf5 Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 12 Feb 2004 05:13:43 +0000 Subject: [PATCH] (mime-display-image): Ignore errors about image decoding. --- mime-image.el | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/mime-image.el b/mime-image.el index 28f3aab..42c1af7 100644 --- a/mime-image.el +++ b/mime-image.el @@ -7,7 +7,6 @@ ;; Dan Rich ;; Daiki Ueno ;; Katsumi Yamaoka -;; Maintainer: MORIOKA Tomohiko ;; Created: 1995/12/15 ;; Renamed: 1997/2/21 from tm-image.el @@ -190,15 +189,20 @@ (defun mime-display-image (entity situation) (message "Decoding image...") - (let ((format (cdr (assq 'image-format situation))) - image) - (setq image (mime-image-create (mime-entity-content entity) format 'data)) - (if (null image) - (message "Invalid glyph!") - (save-excursion - (mime-image-insert image) - (insert "\n") - (message "Decoding image...done"))))) + (condition-case err + (let ((format (cdr (assq 'image-format situation))) + image) + (setq image + (mime-image-create (mime-entity-content entity) + format 'data)) + (if (null image) + (message "Invalid glyph!") + (save-excursion + (mime-image-insert image) + (insert "\n") + (message "Decoding image...done")))) + (error nil err))) + ;;; @ end ;;; -- 1.7.10.4