From 2fae38e5f99f51a8b316e12bd4607a5ec10d5f88 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 30 Jun 2013 15:11:41 +0200 Subject: [PATCH] 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. --- lisp/ChangeLog | 7 +++++++ lisp/net/shr.el | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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)) -- 2.11.4.GIT