diff options
author | Miles Bader <miles@gnu.org> | 2006-01-16 09:27:43 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-01-16 09:27:43 +0000 |
commit | 73043f7d550e049a636d1058ebd7a5b318533aba (patch) | |
tree | 7d3d034bc08fd1c07b0d71fb10bdcffa577104a9 /lisp/gnus/mm-view.el | |
parent | fc77df2c34d088921e1952a8fce5470c5250ad89 (diff) | |
download | emacs-73043f7d550e049a636d1058ebd7a5b318533aba.tar.gz |
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 182-184)
- Merge from emacs--cvs-trunk--0
- Update from CVS
2006-01-16 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/mm-uu.el (mm-uu-text-plain-type): New variable.
(mm-uu-pgp-signed-extract-1): Use it.
(mm-uu-pgp-encrypted-extract-1): Use it.
(mm-uu-dissect): Use it; allow two optional arguments; one is a
flag specifying whether there's no message header; the other is
for a MIME type and parameters; bind mm-uu-text-plain-type with
the later one.
(mm-uu-dissect-text-parts): New function.
* lisp/gnus/gnus-art.el (gnus-display-mime): Use mm-uu-dissect-text-parts to
dissect text parts.
2006-01-13 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (article-wash-html): Use
gnus-summary-show-article-charset-alist if a numeric arg is given.
(gnus-article-wash-html-with-w3m-standalone): New function.
* lisp/gnus/mm-view.el (mm-text-html-renderer-alist): Map w3m-standalone to
mm-inline-text-html-render-with-w3m-standalone.
(mm-text-html-washer-alist): Map w3m-standalone to
gnus-article-wash-html-with-w3m-standalone.
(mm-inline-text-html-render-with-w3m-standalone): New function.
2006-01-13 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (Article Washing): Additions.
2006-01-08 Alex Schroeder <alex@gnu.org>
* man/pgg.texi (Caching passphrase): Rewording.
Diffstat (limited to 'lisp/gnus/mm-view.el')
-rw-r--r-- | lisp/gnus/mm-view.el | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 03c188b87a0..882937c7cb2 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -51,8 +51,7 @@ (defvar mm-text-html-renderer-alist '((w3 . mm-inline-text-html-render-with-w3) (w3m . mm-inline-text-html-render-with-w3m) - (w3m-standalone mm-inline-render-with-stdin nil - "w3m" "-dump" "-T" "text/html") + (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone) (links mm-inline-render-with-file mm-links-remove-leading-blank "links" "-dump" file) @@ -64,8 +63,7 @@ (defvar mm-text-html-washer-alist '((w3 . gnus-article-wash-html-with-w3) (w3m . gnus-article-wash-html-with-w3m) - (w3m-standalone mm-inline-wash-with-stdin nil - "w3m" "-dump" "-T" "text/html") + (w3m-standalone . gnus-article-wash-html-with-w3m-standalone) (links mm-inline-wash-with-file mm-links-remove-leading-blank "links" "-dump" file) @@ -264,6 +262,30 @@ (delete-region ,(point-min-marker) ,(point-max-marker))))))))) +(defun mm-inline-text-html-render-with-w3m-standalone (handle) + "Render a text/html part using w3m." + (let ((source (mm-get-part handle)) + (charset (mail-content-type-get (mm-handle-type handle) 'charset)) + cs) + (unless (and charset + (setq cs (mm-charset-to-coding-system charset)) + (not (eq cs 'ascii))) + ;; The default. + (setq charset "iso-8859-1" + cs 'iso-8859-1)) + (mm-insert-inline + handle + (mm-with-unibyte-buffer + (insert source) + (mm-enable-multibyte) + (let ((coding-system-for-write 'binary) + (coding-system-for-read cs)) + (call-process-region + (point-min) (point-max) + "w3m" t t nil "-dump" "-T" "text/html" + "-I" charset "-O" charset)) + (buffer-string))))) + (defun mm-links-remove-leading-blank () ;; Delete the annoying three spaces preceding each line of links ;; output. |