From: Jim Porter Date: Tue, 22 Oct 2024 15:36:23 +0000 (-0700) Subject: ; Fix a recent change to EWW X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c2c0fb25c5288913c907f60616017b5e9ce4f2d8;p=emacs.git ; Fix a recent change to EWW * lisp/net/eww.el (eww--guess-content-type): Save excursion. (cherry picked from commit f58652a41978974855be0993d42ace225b64efed) --- 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.