diff options
author | Lars Magne Ingebrigtsen <[email protected]> | 2010-11-15 23:45:55 +0000 |
---|---|---|
committer | Katsumi Yamaoka <[email protected]> | 2010-11-15 23:45:55 +0000 |
commit | 8b6f657390dab08e53e2bca366b26d0b57cd1285 (patch) | |
tree | 9eaac6d85b7e8db171d04a04458daa5f28a51440 /lisp/gnus/gnus-art.el | |
parent | 90eef0472571bf7d44aacae16f57e95f52e689d2 (diff) |
Rework how Gnus is supposed to be able to display all the images in HTML.
shr.el (shr-tag-img): Put a displayer in the text property.
gnus-util.el (gnus-find-text-property-region): New utility function.
gnus-html.el (gnus-html-display-image): Make the alt optional.
gnus-html.el (gnus-html-show-images): Remove.
gnus-art.el (gnus-article-show-images): New, more general function.
gnus-html.el, shr.el: Use image-url instead of gnus-image-url to unify the image url text properties.
Diffstat (limited to 'lisp/gnus/gnus-art.el')
-rw-r--r-- | lisp/gnus/gnus-art.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index a5d9a279dd..e2be314f8d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2271,6 +2271,17 @@ unfolded." (dolist (elem gnus-article-image-alist) (gnus-delete-images (car elem))))) +(defun gnus-article-show-images () + "Show any images that are in the HTML-rendered article buffer. +This only works if the article in question is HTML." + (interactive) + (gnus-with-article-buffer + (dolist (region (gnus-find-text-property-region (point-min) (point-max) + 'image-displayer)) + (destructuring-bind (start end function) region + (funcall function (get-text-property start 'image-url) + start end))))) + (defun gnus-article-treat-fold-newsgroups () "Unfold folded message headers. Only the headers that fit into the current window width will be |