]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the bug#24034 change (revno 9eb028f) causing infloop (bug#29047)
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 30 Oct 2017 23:30:19 +0000 (23:30 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 30 Oct 2017 23:30:19 +0000 (23:30 +0000)
* lisp/net/shr.el (shr-fill-line): Copy only face and image-displayer
properties to gaps (bug#29047).

lisp/net/shr.el

index c90d71d15963f1102358d1752fc92ec89a176145..4ba452e4b944ebeae87cc9c29f71950dc0077ef3 100644 (file)
@@ -700,12 +700,16 @@ size, and full-buffer size."
       ;; Success; continue.
       (when (= (preceding-char) ?\s)
        (delete-char -1))
-      (let ((props (text-properties-at (point)))
+      (let ((props `(face ,(get-text-property (point) 'face)
+                         ;; Don't break the image-displayer property
+                         ;; as it will cause `gnus-article-show-images'
+                         ;; to show the two or more same images.
+                         image-displayer
+                         ,(get-text-property (point) 'image-displayer)))
            (gap-start (point)))
        (insert "\n")
        (shr-indent)
-       (when props
-         (add-text-properties gap-start (point) props)))
+       (add-text-properties gap-start (point) props))
       (setq start (point))
       (shr-vertical-motion shr-internal-width)
       (when (looking-at " $")