From 9695908dfa075b863b4a02cfd119690bc2aa7476 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Fri, 21 Jan 2011 04:16:57 +0000 Subject: [PATCH] gnus-art.el (gnus-article-remove-images, gnus-article-show-images): Widen article buffer. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-art.el | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) 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. -- 2.39.2