From: Lars Magne Ingebrigtsen Date: Wed, 17 Nov 2010 17:08:12 +0000 (+0100) Subject: * shr.el (shr-put-image): Break lines when inserting big pictures. X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=ed1aaf38114d4843519317a3e98b9c600c76d9bf * shr.el (shr-put-image): Break lines when inserting big pictures. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2e95ba68..f48be7bd7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-11-17 Lars Magne Ingebrigtsen + + * shr.el (shr-put-image): Break lines when inserting big pictures. + 2010-11-17 Katsumi Yamaoka * shr.el (shr-image-displayer): Protect function against non-existent diff --git a/lisp/shr.el b/lisp/shr.el index 526f81218..b55ee2f43 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -388,6 +388,11 @@ redirects somewhere else." (let ((image (ignore-errors (shr-rescale-image data)))) (when image + ;; When inserting big-ish pictures, put them at the + ;; beginning of the line. + (when (and (> (current-column) 0) + (> (car (image-size image t)) 400)) + (insert "\n")) (insert-image image (or alt "*")))) (insert alt)))