diff lisp/gnus/mm-decode.el @ 110747:0defef1647a5

Merge changes made in Gnus trunk. shr.el: Rename the tag functions a bit, and add some new ones. gnus-sum.el (gnus-summary-select-article-buffer): If the article buffer isn't shown, then select the current article first instead of bugging out. gnus-sum.el (gnus-summary-select-article-buffer): Show both the article and summary buffers again. shr.el (shr-tag-blockquote): Convert name. shr.el (shr-rescale-image): Use the right image-size variant. shr.el (shr-tag-p): Don't insert newlines at the start of the buffer. shr.el: Implement indentation in blockquotes. gnus-sum.el (gnus-summary-select-article-buffer): Really select the article buffer again. shr.el (shr-ensure-paragraph): Don't insert newlines on empty tags at the beginning of the buffer. gnus-ems.el, gnus-util.el, mm-decode.el, mm-view.el: Add resize for large images in mm. gnus-html.el (gnus-html-put-image): Use gnus-rescale-image. shr.el (shr-tag-p): Don't insert newlines on empty tags at the beginning of the buffer. gnus-ems.el, gnus-html.el, gnus-util.el, mm-decode.el, mm-view.el: Support image resizing. shr.el: Add headings. shr.el (shr-ensure-paragraph): Actually work. shr.el (shr-tag-li): Make <ul> prettier. shr.el (shr-insert): Get white space at the beginning/end of elements right. shr.el (shr-tag-li): Tweak <li> rendering. shr.el (shr-tag-p): Collapse subsequent <p>s. shr.el (shr-ensure-paragraph): Don't insert double line feeds after blank lines. shr.el (shr-tag-h6): Add. shr.el (shr-insert): \t is also space.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 04 Oct 2010 00:17:16 +0000
parents 4c31586ca1ca
children 5613a6649f72
line wrap: on
line diff
--- a/lisp/gnus/mm-decode.el	Sun Oct 03 16:35:22 2010 -0700
+++ b/lisp/gnus/mm-decode.el	Mon Oct 04 00:17:16 2010 +0000
@@ -369,8 +369,12 @@
   :group 'mime-display)
 
 (defcustom mm-inline-large-images nil
-  "If non-nil, then all images fit in the buffer."
-  :type 'boolean
+  "If t, then all images fit in the buffer.
+If 'resize, try to resize the images so they fit."
+  :type '(radio
+          (const :tag "Inline large images as they are." t)
+          (const :tag "Resize large images." resize)
+          (const :tag "Do not inline large images." nil))
   :group 'mime-display)
 
 (defcustom mm-file-name-rewrite-functions
@@ -1679,9 +1683,11 @@
   (let ((article-buffer (current-buffer)))
     (unless handle
       (setq handle (mm-dissect-buffer t)))
-    (shr-insert-document
-     (mm-with-part handle
-       (libxml-parse-html-region (point-min) (point-max))))))
+    (save-restriction
+      (narrow-to-region (point) (point))
+      (shr-insert-document
+       (mm-with-part handle
+	 (libxml-parse-html-region (point-min) (point-max)))))))
 
 (provide 'mm-decode)