* lisp/net/eww.el (eww): Use function-put in place of put, as
recommended in "(elisp) Symbol Plists".
(eww-follow-link):
* lisp/net/shr.el (shr-browse-url): Rather than call browse-url-mail
directly, call browse-url which respects the user options
browse-url-handlers and browse-url-mailto-function. (Bug#41133)
(shr--current-link-region): Return nil if there is no link at point.
(shr--blink-link): Adapt accordingly.
(shr-fill-line, shr-indent, shr-table-body): Refactor to avoid some
unnecessary allocations.
* etc/NEWS: Announce that eww-follow-link and shr-browse-url support
custom URL handlers.
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Increase `max-specpdl-size' temporarily.
* lisp/net/tramp-rclone.el (tramp-rclone-flush-directory-cache):
Fix a problem with older Emacsen.
* lisp/net/webjump.el: Use lexical-binding.
(webjump-read-url-choice): Remove redundant 'function' around lambda.
* test/lisp/net/webjump-tests.el: New file with tests for webjump.el.
* lisp/net/browse-url.el (browse-url-handlers): Allow predicates for
matching in browse-url-handlers. Adapt docs and customize type.
(browse-url-select-handler): Support predicates in addition to
regexes.
(browse-url--non-html-file-url-p): New defun.
(browse-url-default-handlers): Use above predicate entry instead of
two entries.
* lisp/net/browse-url.el (browse-url-default-handlers): Add a browser
handler for HTML page file:// URLs before the generic file:// handler.
(browse-url--browser): New defun.
* lisp/net/browse-url.el (browse-url-handlers): New defcustom.
(browse-url-default-handlers): New defvar.
(browse-url): Use them. Adapt docstring. Issue a warning pointing to
browse-url-handlers when browse-url-browser-function is an alist.
(browse-url--mailto, browse-url--man): New functions.
(browse-url--browser-defcustom-type): Add :doc that the alist usage is
deprecated.
(browse-url-browser-function): Remove documentation referring to the
alist usage and mention browse-url-handlers.
* doc/emacs/misc.texi: Document browse-url-handlers in Browse-URL
node.
* etc/NEWS: Mention browse-url-default-handlers and
browse-url-handlers.
* lisp/net/tramp-cmds.el (tramp-cleanup-connection): New optional
argument KEEP-PROCESSES.
* lisp/net/tramp-sh.el (tramp-timeout-session): Use it. (Bug#41042)
* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-get-connection-property): Improve debug messages.
Suggested by Marc Herbert <marc.herbert@gmail.com>.
* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Remove compatibility code dumping the persistency file. Use
`emacs-lisp-mode' for backward compatibility.
Fixes: bug#40573
The new mode can be used stand-alone or inherited from by modes
intended to edit programs. The existing emacs-lisp-mode and lisp-mode
are examples.
Thanks to Juri Linkov and Basil L. Contovounesios for researching some
data files in Emacs that can be automatically set to use the new mode.
* lisp/files.el (auto-mode-alist): Add entry for ".dir-locals" and
".dir-locals-2"
* lisp/emacs-lisp/lisp-mode.el: (lisp-data-mode): New major mode.
(lisp-mode): Inherit from lisp-data-mode. Set special lisp-mode
stuff here.
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from
lisp-data-mode.
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Use lisp-data-mode.
* lisp/saveplace.el (save-place-alist-to-file): Use
lisp-data-mode.
* lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode.
* lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode.
* lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use
lisp-data-mode.
* etc/NEWS: Mention lisp-data-mode.
* doc/lispref/modes.texi (Example Major Modes): Update example.
Found by relint. See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html
* lisp/org/org-table.el (org-table-finish-edit-field):
* lisp/arc-mode.el (archive-rar-summarize):
Avoid wrapped subsumption in repeated sequences.
* lisp/erc/erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Replace
inefficient repeated empty-matching expression with a plain greedy
form.
(erc-dcc-handle-ctcp-send): Adjust group numbers.
* lisp/net/puny.el (puny-encode-domain): Fix fast-path shortcut
pattern so that it actually works as intended.
* lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp):
* lisp/vc/diff-mode.el (diff-imenu-generic-expression):
Remove superfluous backslashes.
* lisp/progmodes/scheme.el (scheme-imenu-generic-expression):
Correct confused definition-matching pattern which would match more
than intended.
* lisp/textmodes/sgml-mode.el (sgml-tag-name-re): Avoid inefficient
matching by using the fact that the first character cannot match the
last char of sgml-name-re.
* doc/lispref/processes.texi (Network): Describe :coding keyword support.
* doc/misc/emacs-gnutls.texi (Help For Developers): Describe :coding
keyword support.
* etc/NEWS: Announce change to open-network-stream and
open-gnutls-stream.
* lisp/net/gnutls.el (open-gnutls-stream): Add support for :coding, pass it
down to open-network-stream.
* lisp/net/network-stream.el (open-network-stream)
(network-stream-open-plain, network-stream-open-starttls): Add
support for :coding, pass it down to make-network-process.
(network-stream-open-shell): Add support-for :coding, use
set-process-coding-system to set it after process creation.
* net/dns.el (dns-write): Correct spelling in docstring.
(dns-read): Add optional tcp-p parameter, skip 2-byte length field
if non-nil.
(dns-query): Tell dns-read and dns-write if we're using TCP.
* lisp/net/dns.el (dns-set-servers): Set dns-servers to nil when we
don't find any DNS servers with nslookup. Add support for IPv6
servers. (Bug#40248).
(dns-make-network-process): Check for datagram process support before
creating a datagram process.
(dns-query): Return nil if dns-servers is nil.
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Flush the
cache after the file has been written.
Reported by Jake Nelson <jake.nelson@gmail.com>.
* lisp/net/rcirc.el (rcirc-check-auth-status): NickServ will response
will show the nick in the same case used during registration, but
it allows case-insensitive matches when logging in. Therefore, we
should accept response messages regardless of case.