]> git.eshelyaron.com Git - emacs.git/commit
Allow toggling "readable" mode in EWW
authorJim Porter <jporterbugs@gmail.com>
Sun, 17 Mar 2024 19:01:59 +0000 (12:01 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sun, 24 Mar 2024 14:21:26 +0000 (15:21 +0100)
commit791684791733c3c24cbeaa6e9f459bb4f2b28219
tree6d9619effeecdd33c5b1a5086f641e1dc7bb9b7f
parentc1eeb2e0c6415c168feed34068ece49734c1d6df
Allow toggling "readable" mode in EWW

Additionally, add an option to prevent adding a new history entry for
each call of 'eww-readable' (bug#68254).

* lisp/net/eww.el (eww-retrieve):

* lisp/net/eww.el (eww-readable-adds-to-history): New option.
(eww-retrieve): Make sure we call CALLBACK in all configurations.
(eww-render): Simplify how to pass encoding.
(eww--parse-html-region, eww-display-document): New functions, extracted
from...
(eww-display-html): ... here.
(eww-document-base): New function.
(eww-readable): Toggle "readable" mode interactively, like with a minor
mode.  Consult 'eww-readable-adds-to-history'.
(eww-reload): Use 'eshell-display-document'.

* test/lisp/net/eww-tests.el (eww-test--with-mock-retrieve): Fix indent.
(eww-test/display/html, eww-test/readable/toggle-display): New tests.

* doc/misc/eww.texi (Basics): Describe the new behavior.

* etc/NEWS: Announce this change.

(cherry picked from commit 72972118e6f5831f200108cd7b80bf86538c265e)
doc/misc/eww.texi
etc/NEWS
lisp/net/eww.el
test/lisp/net/eww-tests.el