From: Lars Ingebrigtsen Date: Fri, 23 Aug 2019 06:51:35 +0000 (+0200) Subject: Avoid an infloop in shr when filling text with :align-to properties X-Git-Tag: emacs-27.0.90~1328^2~112 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aae9ac275c96438b99d977a6ad6726f5b43d3204;p=emacs.git Avoid an infloop in shr when filling text with :align-to properties * lisp/net/shr.el (shr-fill-line): Only join together URL buttons if there are any URL buttons. --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index fbd1a9b7661..c0f8c72d5b6 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -719,6 +719,7 @@ size, and full-buffer size." (insert "\n") (shr-indent) (when (and (> (1- gap-start) (point-min)) + (get-text-property (point) 'shr-url) ;; The link on both sides of the newline are the ;; same... (equal (get-text-property (point) 'shr-url) @@ -2363,6 +2364,7 @@ flags that control whether to collect or render objects." (car (window-text-pixel-size nil (point-min) (point-max))))))) (defun shr-render-td (dom width fill) + (setq d dom) (let ((cache (intern (format "shr-td-cache-%s-%s" width fill)))) (or (dom-attr dom cache) (and fill