X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-image.el;h=42c1af741249cf3ddee62da38e38fcdbad671740;hb=6c9e214812e69707125958677b92bffbe7d508bf;hp=76c23356a8171b8bb4466ac38e42387b9ff12eba;hpb=17cacd9ff91f19bac96c1b6f9db2c414a53d2b68;p=elisp%2Fsemi.git diff --git a/mime-image.el b/mime-image.el index 76c2335..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 @@ -50,12 +49,14 @@ (let ((case-fold-search t) width height xbytes right margin) (goto-char (point-min)) (or (re-search-forward "_width[\t ]+\\([0-9]+\\)" nil t) - (error "!! Illegal xbm file format" (current-buffer))) + (error "!! Illegal xbm file format in the buffer: %s" + (current-buffer))) (setq width (string-to-int (match-string 1)) xbytes (/ (+ width 7) 8)) (goto-char (point-min)) (or (re-search-forward "_height[\t ]+\\([0-9]+\\)" nil t) - (error "!! Illegal xbm file format" (current-buffer))) + (error "!! Illegal xbm file format in the buffer: %s" + (current-buffer))) (setq height (string-to-int (match-string 1))) (goto-char (point-min)) (re-search-forward "0x[0-9a-f][0-9a-f],") @@ -188,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 ;;;