From 4157159a37b43712440da91a45a6d5f71eb96e8a Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 20 Jul 2016 22:56:42 +0000 Subject: [PATCH] * lisp/net/shr.el (shr-fill-line): Preserve text properties in folded lines (bug#24034). --- lisp/net/shr.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 2c8ff79763f..8718e4ffaea 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -636,13 +636,12 @@ size, and full-buffer size." ;; Success; continue. (when (= (preceding-char) ?\s) (delete-char -1)) - (let ((face (get-text-property (point) 'face)) - (background-start (point))) + (let ((props (text-properties-at (point))) + (gap-start (point))) (insert "\n") (shr-indent) - (when face - (put-text-property background-start (point) 'face - `,(shr-face-background face)))) + (when props + (add-text-properties gap-start (point) props))) (setq start (point)) (shr-vertical-motion shr-internal-width) (when (looking-at " $") -- 2.39.5