From: Katsumi Yamaoka Date: Fri, 21 Jan 2011 04:16:57 +0000 (+0000) Subject: gnus-art.el (gnus-article-remove-images, gnus-article-show-images): Widen article... X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~181 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9695908dfa075b863b4a02cfd119690bc2aa7476;p=emacs.git gnus-art.el (gnus-article-remove-images, gnus-article-show-images): Widen article buffer. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c9feb09680b..137e70aa778 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-01-21 Katsumi Yamaoka + + * gnus-art.el (gnus-article-remove-images, gnus-article-show-images): + Widen article buffer. + 2011-01-20 Stefan Monnier * mm-util.el (mm-find-buffer-file-coding-system): Don't forget to kill diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 280914d0f09..e6627b0f854 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2275,19 +2275,23 @@ unfolded." "Remove all images from the article buffer." (interactive) (gnus-with-article-buffer - (dolist (elem gnus-article-image-alist) - (gnus-delete-images (car elem))))) + (save-restriction + (widen) + (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))))) + (save-restriction + (widen) + (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.