From 5394cf674f4a995efb15b2e09d5657f38a7f5a4c Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 6 Feb 2004 06:03:17 +0000 Subject: [PATCH] * mime-image.el (mime-image-normalize-xbm-buffer): Add missing format specifiers. * mime-view.el (mime-view-insert-entity-button): Fix misplaced let form. --- ChangeLog | 8 ++++++++ mime-image.el | 6 ++++-- mime-view.el | 30 ++++++++++++++---------------- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index fce677f..e8fdc2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-02-06 Katsumi Yamaoka + + * mime-image.el (mime-image-normalize-xbm-buffer): Add missing + format specifiers. + + * mime-view.el (mime-view-insert-entity-button): Fix misplaced let + form. + 2004-01-15 Katsumi Yamaoka * mime-edit.el (mime-edit-normalize-body): Fix a comment that the diff --git a/mime-image.el b/mime-image.el index 70347b0..28f3aab 100644 --- a/mime-image.el +++ b/mime-image.el @@ -50,12 +50,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],") diff --git a/mime-view.el b/mime-view.el index 81386cb..41d4329 100644 --- a/mime-view.el +++ b/mime-view.el @@ -599,24 +599,22 @@ mother-buffer." ))) ) (t - (let ((media-type (mime-entity-media-type entity)) - (media-subtype (mime-entity-media-subtype entity)) - (charset (cdr (assoc "charset" params))) - (encoding (mime-entity-encoding entity))) + (let* ((charset (cdr (assoc "charset" params))) + (encoding (mime-entity-encoding entity)) + (rest (format " <%s/%s%s%s>" + (mime-entity-media-type entity) + (mime-entity-media-subtype entity) + (if charset + (concat "; " charset) + "") + (if encoding + (concat " (" encoding ")") + "")))) (concat num " " subject - (let ((rest - (format " <%s/%s%s%s>" - media-type media-subtype - (if charset - (concat "; " charset) - "") - (if encoding - (concat " (" encoding ")") - "")))) - (if (>= (+ (current-column)(length rest))(window-width)) - "\n\t") - rest))) + (if (>= (+ (current-column)(length rest))(window-width)) + "\n\t") + rest)) ))) (function mime-preview-play-current-entity)) )) -- 1.7.10.4