X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-image.el;h=915fa35601da6af80cdc724fed4747e8d5892b8a;hb=b31d0b14648c0ed9cdb41b7d29018627e38d8658;hp=70347b0bdedc0d8e47086724cf88bbf0eb71a317;hpb=4a1a312dd40669d015dbe8a599bc51b4f1a12055;p=elisp%2Fsemi.git diff --git a/mime-image.el b/mime-image.el index 70347b0..915fa35 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 @@ -27,8 +26,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU XEmacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; If you use this program with MULE, please install @@ -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 ;;;