From 5d2ef6db45580635e3b816852a0318e747fec0d4 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Mon, 4 Oct 2010 10:16:57 +0000 Subject: [PATCH] Merge changes made in Gnus trunk. gnus-html.el (gnus-html-put-image): Fix resize image code. shr.el (shr-ensure-paragraph): Fix the non-empty line case. --- lisp/gnus/ChangeLog | 8 ++++++++ lisp/gnus/gnus-html.el | 22 ++++++++++++---------- lisp/gnus/shr.el | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 07e2963107f..4c2f1e11f7c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,11 @@ +2010-10-04 Lars Magne Ingebrigtsen + + * shr.el (shr-ensure-paragraph): Fix the non-empty line case. + +2010-10-04 Julien Danjou + + * gnus-html.el (gnus-html-put-image): Fix resize image code. + 2010-10-04 Lars Magne Ingebrigtsen * shr.el (shr-insert): Use string anchors instead of line anchors. diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 0f8ba83a60c..d0414e78601 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -431,17 +431,19 @@ Return a string with image data." (= (car size) 30) (= (cdr size) 30)))) ;; Good image, add it! - (let ((image (gnus-html-rescale-image + (let ((image (gnus-rescale-image image - ;; (width . height) - (cons - ;; Aimed width - (truncate - (* gnus-max-image-proportion - (- (nth 2 edges) (nth 0 edges)))) - ;; Aimed height - (truncate (* gnus-max-image-proportion - (- (nth 3 edges) (nth 1 edges)))))))) + (let ((edges (gnus-window-inside-pixel-edges + (get-buffer-window (current-buffer))))) + ;; (width . height) + (cons + ;; Aimed width + (truncate + (* gnus-max-image-proportion + (- (nth 2 edges) (nth 0 edges)))) + ;; Aimed height + (truncate (* gnus-max-image-proportion + (- (nth 3 edges) (nth 1 edges))))))))) (delete-region start end) (gnus-put-image image alt-text 'external) (gnus-put-text-property start (point) 'help-echo alt-text) diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 118afe2f3e5..bfcb91e08c5 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -101,7 +101,7 @@ fit these criteria." (insert "\n")) (if (save-excursion (beginning-of-line) - (looking-at " *")) + (looking-at " *$")) (insert "\n") (insert "\n\n"))))) -- 2.39.5