diff lisp/gnus/gnus-art.el @ 112393:f7e256e5ea88

gnus-art.el (gnus-article-remove-images, gnus-article-show-images): Widen article buffer.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 21 Jan 2011 04:16:57 +0000
parents 1b25cd6a6e36
children 0bfcbd0b704b
line wrap: on
line diff
--- a/lisp/gnus/gnus-art.el	Thu Jan 20 21:48:26 2011 -0600
+++ b/lisp/gnus/gnus-art.el	Fri Jan 21 04:16:57 2011 +0000
@@ -2275,19 +2275,23 @@
   "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.