Mercurial > emacs
diff lisp/gnus/mm-decode.el @ 110708:4c31586ca1ca
Merge changes made in Gnus trunk.
shr.el: Start implementation.
shr.el: Continue implementation.
gnus-gravatar.el (gnus-gravatar-insert): Adjust character where we should go backward.
shr.el: Minimally useful state achieved.
mm-decode.el (mm-text-html-renderer): Switch to using shr.el for HTML rendering.
shr.el: (shr-insert): Add a newline after every picture before text.
gnus.texi (Splitting Mail): Really fix the @ref syntax.
shr.el (shr-add-font): Use overlays for combining faces.
shr.el (shr-add-font): Use overlays for combining faces.
shr.el (shr-insert): Pass upwards the text start point.
gnus-util.el: Reintroduce multiple completion functions.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 03 Oct 2010 00:33:27 +0000 |
parents | 2b8ece636433 |
children | 0defef1647a5 |
line wrap: on
line diff
--- a/lisp/gnus/mm-decode.el Sat Oct 02 20:03:44 2010 -0400 +++ b/lisp/gnus/mm-decode.el Sun Oct 03 00:33:27 2010 +0000 @@ -105,7 +105,8 @@ ,disposition ,description ,cache ,id)) (defcustom mm-text-html-renderer - (cond ((executable-find "w3m") 'gnus-article-html) + (cond ((fboundp 'libxml-parse-html-region) 'mm-shr) + ((executable-find "w3m") 'gnus-article-html) ((executable-find "links") 'links) ((executable-find "lynx") 'lynx) ((locate-library "w3") 'w3) @@ -1674,6 +1675,14 @@ (and (eq (mm-body-7-or-8) '7bit) (not (mm-long-lines-p 76)))))) +(defun mm-shr (handle) + (let ((article-buffer (current-buffer))) + (unless handle + (setq handle (mm-dissect-buffer t))) + (shr-insert-document + (mm-with-part handle + (libxml-parse-html-region (point-min) (point-max)))))) + (provide 'mm-decode) ;;; mm-decode.el ends here