changeset 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 70d7e5c6e611
children 23a54fb18e67
files lisp/gnus/ChangeLog lisp/gnus/gnus-art.el
diffstat 2 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Thu Jan 20 21:48:26 2011 -0600
+++ b/lisp/gnus/ChangeLog	Fri Jan 21 04:16:57 2011 +0000
@@ -1,3 +1,8 @@
+2011-01-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-article-remove-images, gnus-article-show-images):
+	Widen article buffer.
+
 2011-01-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* mm-util.el (mm-find-buffer-file-coding-system): Don't forget to kill
--- 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.