* lisp/eshell/esh-mode.el (eshell-scroll-to-bottom-on-input)
(eshell-scroll-to-bottom-on-output): Add t as a choice.
* lisp/net/eww.el (eww-restore-desktop): Add 'auto' as a choice.
* lisp/net/eww.el (eww-mode-map): Delete "Exit" menu item.
It once called 'eww-quit', which was deleted in Dec 2013, so
now it does the same as "Close browser" menu item.
(Bug#79284)
The previous version made a lot of string copies, but only needed the
word count of each DOM node. In this version, we just sum up the word
counts in all the existing nodes, which results in a significant
performance improvement (bug#78902).
* lisp/net/eww.el (eww--string-count-words, eww--dom-count-words): New
functions...
(eww--walk-readability, eww-readable-dom): Use them.
This replaces 'dom-text' and 'dom-texts', and is both more correct and
more efficient than them.
* lisp/dom.el (dom-text, dom-texts): Make obsolete in favor of...
(dom-inner-text--1, dom-inner-text): ... these new functions. Update
callers.
* doc/lispref/text.texi (Document Object Model): Update documentation to
refer to 'dom-inner-text'.
* etc/NEWS: Announce this change.
This makes sure 'eww--track-changes' doesn't interfere with the initial
rendering process. Previously, this caused problems like <textareas>
consuming the rest of the page when reloading the document.
* lisp/net/eww.el (eww--change-tracker-id): New variable.
(eww-display-document): Temporarily unregister our change tracker.
* test/lisp/net/eww-tests.el (eww-test/tag/textarea/reload): New test.
* lisp/net/eww.el (eww-tag-textarea): Set 'start' after ensuring
preceding newline.
* test/lisp/net/eww-tests.el (eww-test/tag/textarea/starts-on-new-line):
New test.
* lisp/net/eww.el (eww-display-html): Check whether a readable form of
the document exists; if not, don't set ':readable' to t.
(eww-readable): Check whether a readable form of the document exists; if
not, warn the user and don't add to history.
(eww-readable-dom): Return nil if no readable form exists.
(eww-mode): Check the ':readable' property of 'eww-data' to show
"readable" state in the mode line.
* test/lisp/net/eww-tests.el
(eww-test/readable/default-readable/non-readable-page): New test
(bug#78958).
The base tag is necessary to correctly resolve relative links.
* lisp/net/eww.el (eww-readable-dom): Retain the base tag in addition to
the title/link tags. (Bug#78948)
* test/lisp/net/eww-tests.el (eww-test--wordy-page): Add a base tag.
(eww-test/readable/default-readable): Test that the base tag is retained.
This helps fix EWW readable mode on some web pages that use these tags,
like the FSF blog.
* lisp/net/eww.el (eww--walk-readability): Check for <style> and
<template> tags.
* lisp/net/eww.el (eww--walk-readability, eww-readable-dom): New
functions.
(eww-display-html): Call 'eww-readable-dom'.
(eww-readable): Call 'eww-readable-dom'. Don't copy over 'eww-data'
properties that our new readable page can handle on its own.
(eww-score-readability): Rewrite in terms of 'eww--walk-readability'.
Make obsolete.
(eww-highest-readability): Make obsolete.
* test/lisp/net/eww-tests.el (eww-test--lots-of-words)
(eww-test--wordy-page): New variables...
(eww-test/readable/toggle-display): ... use them.
(eww-test/readable/default-readable): Make sure that the readable page
includes the <title> and <link> tags (bug#77299).
Previously, navigating to an in-page anchor target would clear
'eww-data', removing many important properties like the original source
and the DOM. Among other things, this prevented enabling/disabling
readable mode.
* lisp/net/eww.el (eww-follow-link): Copy previous 'eww-data'.
* lisp/net/eww.el (eww--parse-html-region): Don't decode when it's a no-op.
(eww-display-raw): Simplify.
(eww-mode): Prefer #' to quote function names.
(eww-switch-to-buffer): Use `completion-table-with-metadata` instead of
`completion-extra-properties`. Don't prompt the user when there's only
one choice.
(eww-buffer-list): Use `eww--buffer-p`.
* lisp/net/eww.el: Require `track-changes`.
(eww-display-document): Don't `inhibit-modification-hooks` any more.
Use `track-changes-register` *at the end* instead.
(eww-mode): Don't use `after-change-functions` any more.
(eww--track-changes): New function.
(eww--process-text-input): Rename from `eww-process-text-input`.
Try and be more careful: don't presume `point` is near
the modification. Check for a form both at BEG and at END.
Don't rely on `:start/:end` pointing to the right places.
Use `:length` instead and shrink the field back to its original length
when possible.
(eww-size-text-inputs): Set `:length` rather than `:start/:end`.
* lisp/net/eww.el (eww--buffer-p): New function.
(eww-switch-to-buffer): Use it. And set `completion-extra-properties`
buffer-locally rather than let-binding it.
* lisp/net/eww.el (eww-switch-to-buffer): When no EWW buffers
exist, call `eww' instead.
(eww-list-buffers): Do not pop to *eww buffers* when there is no
EWW buffers. (Bug#77967)
853719c4c2 ; * lisp/net/eww.el (eww-download): Doc fix (bug#75585)
45ec5865aa ; * etc/NEWS: Tweak wording of NSM items.
b981889e9e ; cperl-mode-tests.el: Don't run the newest test in perl-...
6a864ef8f3 Add smtpmail cross-reference to 'auth-sources'.
1fd7957bc7 ; cperl-mode.el: Add a test for Bug#74245
8d289670d6 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
b74ac4af94 ; cperl-mode.el: Allow bare $ in a signature (Bug#74245)
30e84fc653 Emphasize the use of :tag for new customization types
# Conflicts:
# etc/NEWS
With 'eww-search-words' (by default bound to 'M-s M-w') a user
can type in some search terms and get back the results of a web
search from a predefined search engine. If a region is selected,
'eww-search-words' will use that for the web search instead of
prompting the user.
In its current form, 'eww-search-words' presents a security and
usability problem. It is relatively too easy to mistakenly
launch the function and, if a region of text is selected, have
potentially sensitive data sent out to a third-party service.
This commit changes the search function's default behaviour so
that explicit confirmation is required before a region is sent
to a search engine. The behaviour can be adjusted via the
newly-introduced 'eww-search-confirm-send-region' variable,
which is set to true by default.
* lisp/net/eww.el (eww-search-confirm-send-region): Add.
(eww-search-words): Update default 'eww-search-words' behaviour
so as to ask confirmation before sending the region to a search
engine. (Bug#74218)
Prefer `completion-table-with-metadata' over explicit completion
table lambdas for clarity. Furthermore prefer it over
`completion-extra-properties' to avoid problems with recursive
minibuffers and recursive completion sessions, since the
completion metadata applies only to the outer completion session.
* lisp/bookmark.el (bookmark-completing-read):
* lisp/faces.el (read-face-name):
* lisp/international/emoji.el (emoji--read-emoji):
* lisp/net/dictionary.el (dictionary-completing-read-dictionary):
* lisp/net/rcirc.el (rcirc-completion-at-point):
* lisp/net/eww.el (eww-read-alternate-url):
* lisp/simple.el (read-from-kill-ring): Use it.
* lisp/calendar/calendar.el (calendar-read-date): Use
`completion-table-with-metadata' and `completion-table-case-fold'.
* lisp/proced.el (proced--read-signal): New function.
(proced-send-signal): Use it.
Guarantee that an external browser is used by EWW if
`browse-url-secondary-browser-function' is set to
`eww-browse-url'.
* lisp/net/eww.el (eww-browse-with-external-browser): Use
`browse-url-secondary-browser-function' only if it is an
external browser, otherwise fall back to
`browse-url-with-browser-kind'.
(eww-follow-link): Use `eww-browse-with-external-browser' if the
EXTERNAL prefix argument is non-nil. Improve docstring.
* lisp/net/browse-url.el (browse-url-secondary-browser-function):
Update docstring. (Bug#74730)
The regexp to match doctype tags was simplified and will match
more legacy entries; also correct binding of 'case-fold-search'.
* lisp/net/eww.el (eww--html buffer-list): Update function.
* lisp/net/eww.el (eww-guess-content-type-functions): New user option.
(eww--guess-content-type, eww--html-if-doctype): New functions.
(eww-render): Call 'eww--guess-content-type' (bug#73133).
* lisp/net/eww.el (eww-buffer-list): New function.
(eww-list-buffers): Move logic to...
(eww--list-buffers-display-table, eww--list-buffers-get-data):
... these, and use 'vtable'.
(eww-buffer-select, eww-buffer-show, eww-buffer-kill)
(eww-buffers-mode-map): Use 'vtable-current-object'.
(eww-buffers-mode): Set 'revert-buffer-function'
* lisp/visual-wrap.el (visual-wrap--apply-to-line): Use
'add-display-text-property' so we don't clobber other display
properties.
(visual-wrap--content-prefix): Remove special-case for spaces-only
indent prefix; this was an attempt to be helpful for variable-pitch
fonts, but in practice just interferes with matters. This case now
falls back to the one immediately following it (return the string of
spaces). Use 'string-pixel-width' instead of 'string-width'.
* lisp/net/shr.el (shr-indent): Set 'shr-prefix-length' here to help
keep track of the prefixes of nestedly-indented elements. Set the
specified space width in terms of the default width of the current face.
* lisp/net/shr.el (shr-adaptive-fill-function): Use 'shr-prefix-length'
as set above to return a fill prefix.
* lisp/net/eww.el (eww-render): Enable 'visual-wrap-prefix-mode'
alongside of 'visual-line-mode'.
(eww-mode): Set 'adaptive-fill-function' to
'shr-adaptive-fill-function'.
* etc/NEWS: Announce this change (bug#72485).
dce31372a6 editorconfig-core-handle.el: Fix regressions in fnmatch h...
ed2986494c Checkdoc fixes in `url/*.el`
846c0e10ff Checkdoc fixes in `term/*.el`
3977aa0756 Checkdoc fixes in `mh-e/*.el`
521f740d01 Checkdoc fixes in `calc/*.el`
336aa6ab17 Checkdoc fixes in `textmodes/*.el`
e19fd6a22d Checkdoc fixes in `gnus/*.el`
7350457c79 Checkdoc fixes in `eshell/*.el`
23c1ba81dd Checkdoc fixes in `emulation/*.el`
c85f67a66d Checkdoc fixes in `erc/*.el`
e392382e2e Checkdoc fixes in `vc/*.el`
ef7364b070 Checkdoc fixes in `emacs-lisp/*.el`
5fe1ae0e84 Checkdoc fixes in `mail/*.el`
e43e9d0998 Checkdoc fixes in `net/*.el`
4c6e9f5b00 Improve `use-package-vc-valid-keywords` docstring format
928180f32b ; * etc/TODO: New item on installing Magit.
c193a702dc ; Improve a recent change to the documentation
6ebc5d5c27 ; Delete fixed item from etc/TODO: "proced on macOS"
7b2778e3a3 ; Delete fixed NS bug from etc/TODO
84552ff395 Revert "Fix link to major mode variable in docstring"
198063ba64 * etc/TODO: Add item to convert documentation to 'setopt'.
92de67829c Prefer 'setopt' in browse-url docs
7668385390 ; Improve 'native-comp-debug' documentation