diff options
author | Gnus developers <ding@gnus.org> | 2010-10-04 10:16:57 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2010-10-04 10:16:57 +0000 |
commit | 5d2ef6db45580635e3b816852a0318e747fec0d4 (patch) | |
tree | 6d6b40d3397501e0bc8d0ebd83ad5fb1ab945f7b /lisp/gnus/gnus-html.el | |
parent | 23179cb9f1f9ebc442e5feef277d264cdf561c70 (diff) | |
download | emacs-5d2ef6db45580635e3b816852a0318e747fec0d4.tar.gz |
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.
Diffstat (limited to 'lisp/gnus/gnus-html.el')
-rw-r--r-- | lisp/gnus/gnus-html.el | 22 |
1 files changed, 12 insertions, 10 deletions
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) |