X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmm-view.el;h=68aa8b3186ca418077632e7f0c4c1f3b0950b62f;hb=eeb46cb8eaf87b9c031cef768c84c32cca2c2e28;hp=f40257c56af4b995b4dcde4b987e17bfad1b5e1a;hpb=f6633d1a384b23a15d95593fbffeeb957b35c6ae;p=elisp%2Fgnus.git- diff --git a/lisp/mm-view.el b/lisp/mm-view.el index f40257c..68aa8b3 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -145,23 +145,25 @@ ;; Don't let w3 set the global version of ;; this variable. (fill-column fill-column)) - (condition-case () + (if (or debug-on-error debug-on-quit) (w3-region (point-min) (point-max)) - (error - (delete-region (point-min) (point-max)) - (let ((b (point)) - (charset (mail-content-type-get - (mm-handle-type handle) 'charset))) - (if (or (eq charset 'gnus-decoded) - (eq mail-parse-charset 'gnus-decoded)) + (condition-case () + (w3-region (point-min) (point-max)) + (error + (delete-region (point-min) (point-max)) + (let ((b (point)) + (charset (mail-content-type-get + (mm-handle-type handle) 'charset))) + (if (or (eq charset 'gnus-decoded) + (eq mail-parse-charset 'gnus-decoded)) (save-restriction (narrow-to-region (point) (point)) (mm-insert-part handle) (goto-char (point-max))) - (insert (mm-decode-string (mm-get-part handle) - charset)))) - (message - "Error while rendering html; showing as text/plain")))))) + (insert (mm-decode-string (mm-get-part handle) + charset)))) + (message + "Error while rendering html; showing as text/plain"))))))) (mm-handle-set-undisplayer handle `(lambda () @@ -279,9 +281,7 @@ will not be substituted.") (when charset (delete-region (point-min) (point-max)) (insert (mm-decode-string text charset))) - (let ((w3m-safe-url-regexp (if mm-inline-text-html-with-images - nil - "\\`cid:")) + (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp) (w3m-display-inline-images mm-inline-text-html-with-images) w3m-force-redisplay) (w3m-region (point-min) (point-max))) @@ -311,7 +311,7 @@ will not be substituted.") (delete-region (match-beginning 0) (match-end 0)))) (defun mm-inline-wash-with-file (post-func cmd &rest args) - (let ((file (make-temp-name + (let ((file (mm-make-temp-file (expand-file-name "mm" mm-tmp-directory)))) (let ((coding-system-for-write 'binary)) (write-region (point-min) (point-max) file nil 'silent))