From: Lars Magne Ingebrigtsen Date: Sun, 30 Jun 2013 13:11:41 +0000 (+0200) Subject: Fix shr table rendering infloop X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1983 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2fae38e5f99f51a8b316e12bd4607a5ec10d5f88;p=emacs.git Fix shr table rendering infloop * net/shr.el (shr-make-table-1): Add a sanity check that allows progression on degenerate tables. (shr-rescale-image): ImageMagick animated images currently doesn't work. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4100efc4d6d..4aa4f37a323 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-06-30 Lars Magne Ingebrigtsen + + * net/shr.el (shr-make-table-1): Add a sanity check that allows + progression on degenerate tables. + (shr-rescale-image): ImageMagick animated images currently doesn't + work. + 2013-06-30 Juanma Barranquero Some fixes and improvements for desktop frame restoration. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 490bea40afd..bdc30bc9292 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -762,6 +762,7 @@ If EXTERNAL, browse the URL using `shr-external-browser'." "Rescale DATA, if too big, to fit the current buffer. If FORCE, rescale the image anyway." (if (or (not (fboundp 'imagemagick-types)) + (eq (image-type-from-data data) 'gif) (not (get-buffer-window (current-buffer)))) (create-image data nil t :ascent 100) (let ((edges (window-inside-pixel-edges @@ -1473,7 +1474,10 @@ ones, in case fg and bg are nil." (setq width (if column (aref widths width-column) - 0)) + 10)) + ;; Sanity check for degenerate tables. + (when (zerop width) + (setq width 10)) (when (and fill (setq colspan (cdr (assq :colspan (cdr column))))) (setq colspan (string-to-number colspan))