From: yamaoka Date: Fri, 6 Feb 2004 06:03:17 +0000 (+0000) Subject: * mime-image.el (mime-image-normalize-xbm-buffer): Add missing format X-Git-Tag: semi-1_14-wl-root~46 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fsemi.git;a=commitdiff_plain;h=5394cf674f4a995efb15b2e09d5657f38a7f5a4c * mime-image.el (mime-image-normalize-xbm-buffer): Add missing format specifiers. * mime-view.el (mime-view-insert-entity-button): Fix misplaced let form. --- 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)) ))