* lisp/emacs-lisp/timer.el (run-at-time, run-with-timer): Reject
non-nil REPEAT if it is not a non-negative number. (Bug#79227)
Doc fixes.
* test/lisp/emacs-lisp/timer-tests.el (timer-test-repeat-arg): New
test.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--with-author-identity): New macro, factored out of
vc-test--version-diff.
(vc-test--version-diff, vc-test--other-working-trees): Use it.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): Delete condition to skip
'move-working-tree' tests on Git<=2.17.
(vc-test-git07-other-working-trees): Skip this whole test on
Git<=2.17 (discussion in bug#79024).
* lisp/vc/vc-git.el (vc-git-delete-working-tree): Reimplement to
avoid requiring 'git worktree remove'.
(vc-git-move-working-tree): Use 'git worktree move' if 'git
worktree repair' is not available. Give a more informative
error message if we don't even have that.
* test/lisp/vc/vc-tests/vc-tests.el (vc-git--program-version):
Declare.
(vc-test--other-working-trees): Skip vc-move-working-tree tests
with Git old enough to lack 'git worktree move'.
* etc/NEWS: Add entry for lua-ts-mode changes.
* lisp/progmodes/lua-ts-mode.el
(lua-ts-auto-close-block-comments): New user option.
(lua-ts-mode): Add '--[[ ]]' pairs to 'electric-pair-pairs' only
if 'lua-ts-auto-close-block-comments' is non-nil.
* lisp/textmodes/texinfo.el (texinfo-mode): Add "`` ''" pairs to
'electric-pair-pairs'.
* test/lisp/progmodes/lua-ts-mode-tests.el
(lua-ts-test-auto-close-block-comments): Add new test.
(Bug#79047)
Currently a condition can only be a regexp or a major-mode symbol but
there's no real reason to not allow any predicate as a condition.
* doc/misc/autotype.texi: Document the new condition type in
'auto-insert-alist'.
* etc/NEWS: Announce the new condition type in 'auto-insert-alist'.
* lisp/autoinsert.el (auto-insert-alist): Add the new condition type to
the variable documentation.
(auto-insert): Change the way the condition is matched to allow for
custom predicates.
* test/lisp/autoinsert-tests.el
(autoinsert-tests-auto-insert-lambda/-nil): Add two tests for
lambdas (nil and t cases)
(autoinsert-tests-auto-insert-predicate/-nil): Add two tests for named
predicates (nil and t cases) (Bug#79178)
* lisp/help.el (help-function-arglist): Fix use of `documentation`,
to obey the `function-documentation` property.
* test/lisp/help-tests.el (help-tests--use-docstring-arglist-79128):
New test.
* test/lisp/eshell/em-script-tests.el
(em-script-test/batch-file/shebang): "env -S" is not supported.
* test/src/fns-tests.el (fns-tests-random): 'random' is
non-deterministic on OpenBSD. (Bug#79190)
* lisp/progmodes/python.el (python-shell-local-prefix): New
constant.
(python-shell--convert-file-name-to-send): New function to
add/remove prefix.
(python-shell-send-string, python-shell-send-file): Changed to
use 'python-shell--convert-file-name-to-send'.
(python-pdbtrack-set-tracked-buffer): Changed to add/remove
prefix.
* test/lisp/progmodes/python-tests.el
(python-shell--convert-file-name-to-send-1): New test.
(Bug#79036)
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Don't use UTC in all cases.
* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-times): New defun.
(tramp-smb-file-name-handler-alist): Use it.
* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Adapt test.
* lisp/vc/vc-git.el (vc-git-known-other-working-trees):
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees):
Tolerate directories with symlinks in them, such as the standard
temporary dirs on MacOS. 'git worktree list' outputs expanded names.
* lisp/progmodes/python.el (python-indent-dedent-line-backspace):
Delete the text in the region if Transient Mark mode is enabled,
the mark is active, and prefix arg is 1. (Bug#48695)
* test/lisp/progmodes/python-tests.el
(python-indent-dedent-line-backspace-4): Add new test.
When building a query string via `url-build-query-string',
%-encode literal % characters appearing in both the keys and
the values.
* lisp/url/url-util.el (url--query-key-value-preserved-chars):
Define a new constant based on `url-query-key-value-allowed-chars'
specifying the characters that should be preserved when %-encoding
query-string keys and values.
(url-build-query-string): Use the new constant (fixes Bug#78984).
* test/lisp/url/url-util-tests.el (url-util-tests): Add a test.
* test/lisp/erc/erc-join-tests.el
(erc-join-tests--autojoin-channels-ident): A `sleep-for' value of 0.01
caused associated tests to fail on at least one setup involving Solaris
10. The new value is arbitrary and possibly temporary, pending further
investigation. (Bug#79017)
* lisp/progmodes/cperl-mode.el (cperl--sub-name-generated-rx):
Simplify captures to account for the :writer attribute. Parsing
is done later.
(cperl-imenu-sub-keywords): Remove attributes which generate subs
(cperl-imenu--create-perl-index): Analyze field declarations for
autogenerated methods
(cperl-init-faces): Add "all" and "any" to the list of functions
(cperl-short-docs): Add short docs for "all" and "any"
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-autogenerated-reader-rx):
Adjust for modified rx form due to ":writer" support
(cperl-test-imenu-index): Add tests for autogenerated writer
accessors (in grammar.pl)
* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add code samples
for ":writer"
* etc/NEWS: Announce that CPerl mode supports Perl 5.42.
* lisp/erc/erc-join.el (erc-autojoin-channels-delayed): Only cancel
`erc--autojoin-timer' in the server buffer in which it's local. After
Emacs 28 brought commit fc66ec3322 "Prefer
defvar-local in erc", customizing `erc-autojoin-timing' to `ident' led
to ERC emitting redundant JOINs before `erc-autojoin--join' was factored
out. Additionally, don't bother binding options around the call to
`erc-autojoin-channels' to shape its behavior, preferring instead to
call the internal workhorse function directly. Ever since bug#5521
introduced those options, the logic in `erc-autojoin-channels' has
ignored `erc-autojoin-delay' anyway, so long as `erc-autojoin-timing'
isn't `ident'. This change may break third party advice.
(erc-autojoin-after-ident): Restore code to cancel timer. It was
erroneously deleted in 959fbcf34b "favor
network identities in erc-join".
* test/lisp/erc/erc-join-tests.el: Require erc-tests-common atop file so
tests can take advantage of common utilities.
(erc-autojoin-channels--connect): Replace with a function and three
separate tests.
(erc-join-tests--autojoin-channels-connect): New function.
(erc-autojoin-channels/server, erc-autojoin-channels/network)
(erc-autojoin-channels/nomatch): New tests.
(erc-autojoin-channels--delay): Replace with a function and three
separate tests. Remove guard to skip test on Solaris.
(erc-join-tests--autojoin-channels-ident): New function.
(erc-autojoin-channels-delayed/server)
(erc-autojoin-channels-delayed/network)
(erc-autojoin-channels-delayed/nomatch): New tests.
(erc-autojoin-channels--ident): Replace with function and two separate
tests.
(erc-join-tests--autojoin-after-ident): New function.
(erc-autojoin-after-ident/server)
(erc-autojoin-after-ident/network): New tests.
(erc-join-tests--autojoin-add--common)
(erc-join-tests--autojoin-add): Rename former to latter.
(erc-autojoin-add--network)
(erc-autojoin-add--network-extended-syntax)
(erc-autojoin-add--network-id): Adjust arguments to fixture.
(erc-autojoin-add--server): Use common utils.
(erc-join-tests--autojoin-remove--common)
(erc-join-tests--autojoin-remove): Rename former to latter.
(erc-autojoin-remove--network)
(erc-autojoin-remove--network-id): Adjust args for fixture.
(erc-autojoin-remove--server): Use common utils.
* test/lisp/erc/erc-scenarios-join-timing.el: New file.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--run-in-term): In subprocess, don't use failure
tally as exit status unless body form succeeds.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-init-server-proc): Use `make-process' instead of
`start-process'.
(erc-tests-common-make-server-buf): Use `erc-server-current-nick' to
create the `erc-networks--id' as a `erc-networks--id-qualifying'
instance, which is more realistic than a "fixed" variant.
* test/lisp/erc/resources/join/timing/connect-both.eld: New file.
* test/lisp/erc/resources/join/timing/ident-both.eld: New file.
(Bug#79017)
* test/lisp/vc/vc-tests/vc-tests.el (project, cl-lib): Require.
(vc-test--other-working-trees): Bind project-list-file to a
writeable file name.
(vc-test-hg07-other-working-trees): Use vc-hg-global-switches to
enable the share extension.
a44e9139c2 loaddefs-generate--rubric: Note about committing ldefs-bo...
e4908623f2 ; Fix documentation of 'other-window'
5f3cbd62b1 ; * lisp/international/quail.el (quail-insert-kbd-layout)...
47deb38f21 ; face-font-family-alternatives, fixed-pitch: Comments.
dd29b0ab66 Fix Eshell call to 'string-suffix-p' when checking for tr...
cbfc095ed4 * etc/PROBLEMS: Describe how to work around screen reader...
8f00d36b63 (gnus)Scoring Tips: New tip regarding header continuation...
* lisp/filenotify.el (file-notify--rm-descriptor):
Use `insert-special-event'.
* lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Fix docstring.
(tramp-sh-gio-monitor-process-filter): Extend error strings.
* test/infra/Dockerfile.emba (emacs-base): Install python3.
* test/lisp/filenotify-tests.el (auto-revert-buffer-list): Declare.
(file-notify--test-rootdir): New defvar. Replace all uses of
`temporary-file-directory' by it.
(file-notify--test-cleanup): Set `auto-revert-buffer-list' to nil.
(file-notify--test-monitor): Check also for `process-live-p'.
Skip test, if the monitor cannot be determined.
(file-notify--deftest-remote): Do not call
`tramp-cleanup-connection', this is done in
`file-notify--test-cleanup' already.
(with-file-notify-test): New defmacro. Use it in (almost) all tests.
(file-notify--test-make-temp-name): Do not create
`file-notify--test-tmpdir'.
(file-notify--test-event-handler): Use `directory-file-name '.
(auto-revert-debug): Set it to nil.
(file-notify-test<nn>-*): Rewrite, using `with-file-notify-test'
and `ert-with-temp-file'.
* test/lisp/net/tramp-tests.el (tramp-test46-file-notifications):
Tag it :unstable.
* lisp/vc/vc-git.el (vc-git--read-start-point): New function,
factored out of vc-git-create-tag.
(vc-git-create-tag): Use it.
(vc-git--worktrees, vc-git-known-other-working-trees)
(vc-git-add-working-tree, vc-git-delete-working-tree)
(vc-git-move-working-tree):
* lisp/vc/vc-hg.el (vc-hg-known-other-working-trees)
(vc-hg-add-working-tree, vc-hg--shared-p)
(vc-hg-delete-working-tree, vc-hg-move-working-tree): New
functions.
* lisp/vc/vc.el: Define API for known-other-working-tree,
add-working-tree, delete-working-tree and move-working-tree
backend functions.
(vc-dir-status-files): New function.
(project-current-directory-override): Declare.
(dired-rename-subdir): Autoload.
(vc-add-working-tree, vc-switch-working-tree)
(vc-delete-working-tree, vc-move-working-tree): New commands.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them under C-x v.
* doc/emacs/vc1-xtra.texi (Other Working Trees): New node.
* etc/NEWS: Announce the new commands.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): New function.
(vc-test-git07-other-working-trees)
(vc-test-hg07-other-working-trees): New tests.
* lisp/ldefs-boot.el: Regenerate.
* test/lisp/net/network-stream-tests.el (with-tls-params): New
macro, abstracts most of the boiler plate for TLS tests.
(connect-to-tls-ipv4-wait, connect-to-tls-ipv4-nowait)
(connect-to-tls-ipv6-nowait, open-network-stream-tls-wait)
(open-network-stream-tls-nowait, open-network-stream-tls)
(open-network-stream-tls-nocert)
(open-gnutls-stream-new-api-default)
(open-gnutls-stream-new-api-wait)
open-gnutls-stream-old-api-wait)
(open-gnutls-stream-new-api-nowait)
(open-gnutls-stream-old-api-nowait): Use it.
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.
This allows the byte compiler to give correct positions, those
of the invoking forms, when an error or warning is caused by
the innards of the invoked macros.
This fixes bug#73725 and bug#73746.
* lisp/emacs-lisp/macroexp.el (macroexp--posify-form-1)
(macroexp--posify-form): New functions.
(macroexp-preserve-posification): New macro.
(macroexp--compiler-macro, macroexp-macroexpand): Use the new
macro to preserve a calling form's position.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Use the new
macro to preserve source positions.
* test/lisp/emacs-lisp/bytecomp-resources/bad-error-position.el
* test/lisp/emacs-lisp/bytecomp-resources/bad-error-position-2.el:
New test files.
* test/lisp/emacs-lisp/bytecomp-tests.el: Two new tests using
the new test files.
This option only affects absolute filenames that are found by
ffap-file-at-point in buffers with remote default directory.
The handling of relative filenames in above buffers remains
unchanged: ffap-file-at-point returns the relative filename,
which can be converted to a remote absolute filename by
subsequent callers (e.g. ffap) using expand-file-name.
* lisp/ffap.el (ffap-prefer-remote-file): New user option.
(ffap-file-exists-string): Add an optional argument to allow the
check of existence of absolute filename on the remote host.
(ffap-file-at-point): Always find remote files in remote context
if the new option is non-nil.
* test/lisp/ffap-tests.el (ffap-test-remote): Add a test.
* etc/NEWS: Announce the change.
This option only affects absolute filenames that are found by
ffap-file-at-point in buffers with remote default directory.
The handling of relative filenames in above buffers remains
unchanged: ffap-file-at-point returns the relative filename,
which can be converted to a remote absolute filename by
subsequent callers (e.g. ffap) using expand-file-name.
* lisp/ffap.el (ffap-prefer-remote-file): New user option.
(ffap-file-exists-string): Add an optional argument to allow the
check of existence of absolute filename on the remote host.
(ffap-file-at-point): Always find remote files in remote context
if the new option is non-nil.
* test/lisp/ffap-tests.el (ffap-test-remote): Add a test.
* etc/NEWS: Announce the change.
* lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default):
(eieio-oset, eieio-oset-default): Don't look for class slots except in
eieio classes.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-defstruct-slot-value): New test.