From: yamaoka Date: Fri, 25 Jan 2002 02:53:09 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-01-quimby~106 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc21df2e84990f1cc7fa51c072096bf710512fcf;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d3c475..e41a933 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,10 +1,18 @@ +2002-01-25 Katsumi Yamaoka + + * lpath.el: Fbind `w3m-charset-to-coding-system'; bind + `w3m-meta-content-type-charset-regexp'. + + * mm-view.el (mm-inline-text-html-render-with-w3m): Decode + charset-encoded html contents. + 2002-01-24 ShengHuo ZHU * gnus-agent.el (gnus-agent-request-article): Make sure it is not empty file. * nnweb.el (url): Ignore errors when request url. - + * nnrss.el: Clean up the comments. 2002-01-24 Katsumi Yamaoka diff --git a/lisp/lpath.el b/lisp/lpath.el index d53a322..42622d0 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -40,7 +40,7 @@ url-view-url vcard-pretty-print url-insert-file-contents w3-coding-system-for-mime-charset w3-prepare-buffer w3-region - w3m-region + w3m-charset-to-coding-system w3m-region widget-make-intangible x-defined-colors)) (maybe-bind '(adaptive-fill-first-line-regexp @@ -58,7 +58,7 @@ rmail-enable-mime-composing rmail-insert-mime-forwarded-message-function w3-meta-content-type-charset-regexp - w3m-mode-map)) + w3m-meta-content-type-charset-regexp w3m-mode-map)) (if (featurep 'xemacs) (progn diff --git a/lisp/mm-view.el b/lisp/mm-view.el index 26f68a0..ac94e4a 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -165,12 +165,19 @@ (defun mm-inline-text-html-render-with-w3m (handle) (mm-setup-w3m) (let ((text (mm-get-part handle)) - (b (point))) + (b (point)) + (charset (mail-content-type-get (mm-handle-type handle) 'charset))) (save-excursion (insert text) (save-restriction (narrow-to-region b (point)) (goto-char (point-min)) + (when (re-search-forward w3m-meta-content-type-charset-regexp nil t) + (setq charset (or (w3m-charset-to-coding-system (match-string 2)) + charset))) + (when charset + (delete-region (point-min) (point-max)) + (insert (mm-decode-string text charset))) (w3m-region (point-min) (point-max)) (setq mm-w3m-minor-mode t)) (mm-handle-set-undisplayer