On 3/21/2024 3:51 AM, Eli Zaretskii wrote: > Yes, tests would be good. I've now added tests. (Good thing too, since I found a minor bug while writing them!) >> ++++ >> +*** 'eww-readable' now toggles display of the readable parts of a web page. >> +When called interactively, 'eww-readable' toggles whether to display >> +only the readable parts of a page or the full page. With a positive >> +prefix argument, always display the readable parts, and with a zero or >> +negative prefix, always display the full page. > > You say "toggles", but then "display". It is better to make the style > consistent. Fixed. >> +(defun eww--parse-html-region (start end &optional encode) >> + "Parse the HTML between START and END, returning the DOM as an S-expression. >> +Use ENCODE to decode the region; if nil, decode as UTF-8. > > It is better to call the argument DECODE, not ENCODE. I changed this to CODING-SYSTEM, since that's what 'decode-coding-region' calls the argument. >> +@vindex eww-readable-urls >> + If you want EWW to render a certain page in ``readable'' mode by >> +default, you can add a regular expression matching its URL to >> +@code{eww-readable-urls}. Each entry can either be a regular expression >> +as a string or a cons cell of the form @code{(@var{regexp} >> +. @var{readability})}. If @var{readability} is non-@code{nil}, this > ^^ > Please use @w to prevent breaking long expressions between two lines. > Also, please leave two spaces between sentences. Thanks, both fixed. I never knew about @w. >> +(defcustom eww-readable-urls nil >> + "A list of regexps matching URLs to display in readable mode by default. >> +Each element can be either a string regexp or a cons cell of the >> +form (REGEXP . READABILITY). If READABILITY is non-nil, this behaves >> +the same as the string form; otherwise, URLs matching REGEXP will never > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > What do you mean by "the same as the string form"? which string form? I've tried to clarify this. By "string form", I meant the "string regexp" mentioned previously; in my new patch, I describe that as "a regular expression in string form".