From a0ccf8d66844c87fa4ab9d7c6f9216699d07a337 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 16 Oct 2010 20:03:44 +0200 Subject: [PATCH] * shr.el (shr-tag-img): Don't align images. Since we're not rescaling, this often leads to ugly displays. --- lisp/ChangeLog | 5 +++++ lisp/shr.el | 22 +--------------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1a66ec92d..36ba67ed2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-16 Lars Magne Ingebrigtsen + + * shr.el (shr-tag-img): Don't align images -- since we're not + rescaling, this often leads to ugly displays. + 2010-10-15 Andrew Cohen * gnus-sum.el (gnus-summary-refer-thread): unconditionally ignore diff --git a/lisp/shr.el b/lisp/shr.el index 6499b35d0..998ad30ae 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -426,27 +426,7 @@ Return a string with image data." (not (eq shr-state 'image))) (insert "\n")) (let ((alt (cdr (assq :alt cont))) - (url (cdr (assq :src cont))) - (width (cdr (assq :width cont)))) - ;; Only respect align if width specified. - (when width - ;; Check that width is not larger than max width, otherwise ignore - ;; align - (let ((max-width (* shr-width (frame-char-width))) - (width (string-to-number width))) - (when (< width max-width) - (let ((align (cdr (assq :align cont)))) - (cond - ((string= align "right") - (insert (propertize - " " 'display - `(space . (:align-to - ,(list (- max-width width))))))) - ((string= align "center") - (insert (propertize - " " 'display - `(space . (:balign-to - ,(list (- (/ max-width 2) width)))))))))))) + (url (cdr (assq :src cont)))) (let ((start (point-marker))) (when (zerop (length alt)) (setq alt "[img]")) -- 2.11.4.GIT