From: morioka Date: Sun, 22 Mar 1998 09:16:03 +0000 (+0000) Subject: (mime-view-filter-for-image): Change interface. X-Git-Tag: semi-1_1_2~12 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=013ad3164203794ef0f19cc5cb27c85038b78459;p=elisp%2Fsemi.git (mime-view-filter-for-image): Change interface. Abolish `mime-view-filter-for-application/postscript'. --- diff --git a/mime-image.el b/mime-image.el index 6bfbf0c..b0dbb9e 100644 --- a/mime-image.el +++ b/mime-image.el @@ -149,13 +149,16 @@ ;;; ;; (for XEmacs 19.12 or later) -(defun mime-view-filter-for-image (ctype params encoding) +(defun mime-view-filter-for-image (situation) (let ((beg (point-min)) (end (point-max))) (remove-text-properties beg end '(face nil)) (message "Decoding image...") - (mime-decode-region beg end encoding) - (let* ((minor (cdr (assoc ctype mime-view-image-converter-alist))) + (mime-decode-region beg end (cdr (assq 'encoding situation))) + (let* ((minor (cdr (assoc (mime-type/subtype-string + (cdr (assq 'type situation)) + (cdr (assq 'subtype situation))) + mime-view-image-converter-alist))) (gl (image-normalize minor (buffer-string))) e) (delete-region (point-min)(point-max)) @@ -191,26 +194,26 @@ ;;; ;; (for XEmacs 19.14 or later) -(defun mime-view-filter-for-application/postscript (ctype params encoding) - (let* ((beg (point-min)) (end (point-max)) - (file-base - (make-temp-name (expand-file-name "tm" mime-temp-directory))) - (ps-file (concat file-base ".ps")) - (gif-file (concat file-base ".gif")) - ) - (remove-text-properties beg end '(face nil)) - (message "Decoding Postscript...") - (mime-decode-region beg end encoding) - (write-region (point-min)(point-max) ps-file) - (message "Decoding Postscript...") - (delete-region (point-min)(point-max)) - (call-process mime-view-ps-to-gif-command nil nil nil ps-file) - (set-extent-end-glyph (make-extent (point) (point)) - (make-glyph (vector 'gif :file gif-file))) - (message "Decoding Postscript... done") - (delete-file ps-file) - (delete-file gif-file) - )) +;; (defun mime-view-filter-for-application/postscript (ctype params encoding) +;; (let* ((beg (point-min)) (end (point-max)) +;; (file-base +;; (make-temp-name (expand-file-name "tm" mime-temp-directory))) +;; (ps-file (concat file-base ".ps")) +;; (gif-file (concat file-base ".gif")) +;; ) +;; (remove-text-properties beg end '(face nil)) +;; (message "Decoding Postscript...") +;; (mime-decode-region beg end encoding) +;; (write-region (point-min)(point-max) ps-file) +;; (message "Decoding Postscript...") +;; (delete-region (point-min)(point-max)) +;; (call-process mime-view-ps-to-gif-command nil nil nil ps-file) +;; (set-extent-end-glyph (make-extent (point) (point)) +;; (make-glyph (vector 'gif :file gif-file))) +;; (message "Decoding Postscript... done") +;; (delete-file ps-file) +;; (delete-file gif-file) +;; )) ;; If you would like to display inline Postscript image, please ;; activate following: