From c2c0fb25c5288913c907f60616017b5e9ce4f2d8 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Tue, 22 Oct 2024 08:36:23 -0700 Subject: [PATCH] ; Fix a recent change to EWW * lisp/net/eww.el (eww--guess-content-type): Save excursion. (cherry picked from commit f58652a41978974855be0993d42ace225b64efed) --- lisp/net/eww.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 4df9740d540..6559c7e5eb9 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -651,9 +651,10 @@ Will call each function in `eww-guess-content-type-functions', until one of them returns a value. This mechanism is used only if there isn't a valid Content-Type header. If none of the functions can guess, return \"application/octet-stream\"." - (or (run-hook-with-args-until-success - 'eww-guess-content-type-functions headers response-buffer) - "application/octet-stream")) + (save-excursion + (or (run-hook-with-args-until-success + 'eww-guess-content-type-functions headers response-buffer) + "application/octet-stream"))) (defun eww--html-if-doctype (_headers response-buffer) "Return \"text/html\" if RESPONSE-BUFFER has an HTML doctype declaration. -- 2.39.2