From 3198a1646e743dbf8178efb8bba7dea6230f2874 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 25 Nov 2017 13:31:51 +0200 Subject: [PATCH] Avoid jumbled order in HTML rendered by shr.el * lisp/net/shr.el (shr-render-td): Preserve point, as shr-render-td-1 might move it as a side effect of save-window-excursion. (Bug#29348) --- lisp/net/shr.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 4ba452e4b94..ab7240c8c3d 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -2289,8 +2289,10 @@ flags that control whether to collect or render objects." (<= (car (cdr attr)) width)) (setq result (cdr attr))))))) result)) - (let ((result (shr-render-td-1 dom width fill))) + (let* ((pt (point)) + (result (shr-render-td-1 dom width fill))) (dom-set-attribute dom cache result) + (goto-char pt) result)))) (defun shr-render-td-1 (dom width fill)