1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 09:00:31 -08:00
Commit graph

5339 commits

Author SHA1 Message Date
Sean Whitton
d4c9f08f26 vc-test--with-author-identity: Handle Mercurial
* test/lisp/vc/vc-tests/vc-tests.el (vc-hg-global-switches):
Declare.
(vc-test--with-author-identity): Handle Mercurial.
2025-08-16 14:12:04 +01:00
Eli Zaretskii
01e351de60 Reject non-nil non-number REPEAT in 'run-with-timer'
* 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.
2025-08-16 10:53:12 +03:00
Elijah Gabe Pérez
97e2e90519 Fix lua-ts-mode-tests.el
* test/lisp/progmodes/lua-ts-mode-tests.el
(lua-ts-test-auto-close-block-comments): Skip when needed.
2025-08-14 16:29:45 +02:00
Sean Whitton
bb1c737531 vc-test--other-working-trees: Export env vars so Git finds an author
* 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.
2025-08-12 20:35:49 +01:00
Sean Whitton
2923d244a3 vc-test--other-working-trees: Fix a skip condition
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): For Git, don't try moving the
first working tree unless we have Git>=2.29.
2025-08-12 14:36:15 +01:00
Sean Whitton
c687756ce2 vc-test-git07-other-working-trees: Widen scope of skip on Git<=2.17
* 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).
2025-08-12 14:11:13 +01:00
Sean Whitton
66eead6fd0 Fix some 'git worktree' compatibility issues
* 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'.
2025-08-10 13:25:41 +01:00
Elías Gabriel Pérez
e4352c7a45 Add multi-character pairs to lua-ts-mode and texinfo-mode
* 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)
2025-08-09 13:41:43 +03:00
Eli Zaretskii
477e44fca3 ; * lisp/autoinsert.el (auto-insert-alist): Fix last change. 2025-08-09 13:38:10 +03:00
mattiasdrp
bd1362b686 Autoinsert: Allow condition to be a function
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)
2025-08-09 13:35:48 +03:00
Michael Albinus
42358d56f9 Rework autorevert-tests.el
* lisp/autorevert.el (auto-revert-handler): Rearrange timer handling.

* test/lisp/autorevert-tests.el (ert-temp-file-prefix): Don't set it.
(auto-revert--test-rootdir, auto-revert--test-monitors): New defvars.
Replace globally `temporary-file-directory' by
`auto-revert--test-rootdir'.
(auto-revert--wait-for-revert): Rewrite.
(auto-revert--test-library, auto-revert--test-monitor)
(auto-revert--skip-unless-proper-library-and-monitor): New defuns.
(with-auto-revert-test): Let-bind `ert-temp-file-prefix'.  Call
`file-notify-rm-all-watches'.
(auto-revert-test--write-region, auto-revert-test--write-file):
New defuns.
(auto-revert-testNN-*): Rework.
2025-08-08 18:44:58 +02:00
Michael Albinus
67e16dca90 Rework filenotify-tests.el
* test/lisp/filenotify-tests.el (ert-temp-file-suffix): Set it.
(with-file-notify-test): Don't set :suffix.
(file-notify-testNN-*): Rework.
2025-08-08 18:27:30 +02:00
Stefan Monnier
2b3eb8d3f0 (help-function-arglist): Fix bug#79128
* 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.
2025-08-07 13:49:48 -04:00
Manuel Giraud
42b990cd20 Fix some tests on OpenBSD
* 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)
2025-08-07 17:43:58 +03:00
kobarity
3d8fbb0716 Fix Python PDB tracking for remote inferior Python
* 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)
2025-08-07 16:06:28 +03:00
Michael Albinus
d3cd93dc4d Add set-file-times implementation for Tramp smb method
* 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.
2025-08-06 17:59:02 +02:00
Michael Albinus
5ff8a90395 Tramp allows now external implementations for functions
* doc/misc/tramp.texi (Frequently Asked Questions): Mention tramp-hlo.
(New operations): New node.
(Top, Files directories and localnames):  Add it to @menu.

* etc/NEWS: Mention Tramp's feature to add function implementations.
Presentational fixes and improvements.

* lisp/net/tramp.el (tramp-file-name-for-operation-external): New defvar.
(tramp-file-name-for-operation): Use `memq'.  Handle external
operations.  Raise `remote-file-error' error in case of.
(tramp-add-external-operation, tramp-remove-external-operation):
New defuns.

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test50-auto-load)
(tramp-archive-test50-delay-load)
(tramp-archive-test51-without-remote-files): Rename.

* test/lisp/net/tramp-tests.el (tramp--test-operation)
(tramp--handler-for-test-operation): New defuns.
(tramp-test49-external-backend-function): New test.
(tramp-test50-auto-load, tramp-test50-delay-load)
(tramp-test50-recursive-load, tramp-test50-remote-load-path)
(tramp-test51-without-remote-files, tramp-test52-unload): Rename.
2025-08-05 12:00:21 +02:00
Mattias Engdegård
1811cb294e Fix vc-git worktrees and vc-tests for directories with symlinks
* 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.
2025-08-04 10:55:25 +01:00
F. Jason Park
5c153cfb96 ; Make erc-autojoin-channels-delayed tests more robust
* test/lisp/erc/erc-join-tests.el
(erc-join-tests--autojoin-channels-ident): Be more flexible in checking
assertion.  (Bug#79017)
2025-08-03 01:31:42 -07:00
Jakub Ječmínek
e52ed1b5d1 Improve region deletion handling in python.el
* 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.
2025-08-02 17:14:50 +03:00
Steven Allen
5140e317b7 url: %-encode literal % characters when building query strings
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.
2025-08-02 16:49:52 +03:00
Michael Albinus
4516091fd8 Fix problem in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes):
Use `directory-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test19-directory-files-and-attributes): Extend tests.
2025-07-30 09:33:20 +02:00
F. Jason Park
edd1f0512f ; Adjust sleep-for in erc-autojoin-channels tests
* 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)
2025-07-29 16:02:16 -07:00
Harald Jörg
cef4302d30 cperl-mode.el: Support syntax of Perl version 5.42
* 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.
2025-07-28 18:20:26 +02:00
F. Jason Park
db8f469bd4 Redo erc-nicks track integration tests as scenarios
* test/lisp/erc/erc-nicks-tests.el (erc-nicks-tests--track-faces):
Remove unused function.
(erc-nicks-track-faces/prioritize, erc-nicks-track-faces/defer)
(erc-nicks-track-faces/nil, erc-nicks-track-faces/t): Remove tests.
* test/lisp/erc/erc-scenarios-nicks-track.el: New file.
* test/lisp/erc/resources/nicks/track-prioritize.eld: New file.
* test/lisp/erc/resources/nicks/track-t.eld: New file.  (Bug#76188)
2025-07-27 19:57:28 -07:00
F. Jason Park
2f5fe1a48e Cancel ERC autojoin timer in the server buffer
* 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)
2025-07-27 19:57:28 -07:00
Sean Whitton
e954b29f5f vc-test--other-working-trees: Stub out 'vc-dir'
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): Stub out 'vc-dir' when adding
the second working tree.
2025-07-27 19:44:31 +01:00
Sean Whitton
eadc36a2af vc-tests: Fix two problems with other working tree tests
* 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.
2025-07-27 09:24:02 +01:00
Sean Whitton
ed71aac7ea ; vc-test--other-working-trees: Fix unused variable warning. 2025-07-26 13:13:29 +01:00
Eli Zaretskii
ccc3068dae Merge from origin/emacs-30
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...
2025-07-26 06:58:12 -04:00
Michael Albinus
76c17ac0f0 Rework filenotify-tests.el
* 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.
2025-07-26 12:45:51 +02:00
Sean Whitton
50ffb29d0b VC: New support for other working trees
* 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.
2025-07-25 19:34:04 +01:00
Sean Whitton
08ca6caa0a vc-test--version-diff: Bind vc-async-checkin
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--version-diff):
Bind vc-async-checkin to disable async checkins during test.
2025-07-25 19:04:07 +01:00
Robert Pluim
5cce567f20 Use macro to reduce repetition in TLS tests
* 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.
2025-07-24 18:04:29 +02:00
Jim Porter
0d752f15b8 Handle Eshell prompts where stickiness properties are 't'
Previously, this signaled an error, breaking the prompt (bug#79059).

* lisp/eshell/em-prompt.el (eshell--append-text-property): Don't append
to non-list property values.

* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test/field-properties/merge-stickiness): Adapt test.
2025-07-22 22:24:15 -07:00
Jim Porter
dd29b0ab66 Fix Eshell call to 'string-suffix-p' when checking for trailing newline
* lisp/eshell/esh-io.el (eshell--output-maybe-n): Fix call.

* test/lisp/eshell/esh-io-tests.el
(esh-io-test/output-newline/add-newline)
(esh-io-test/output-newline/no-newline)
(esh-io-test/output-newline/no-extra-newline): New tests (bug#79063).
2025-07-21 18:47:43 -07:00
Jim Porter
dc38f05757 Disable track-changes while reloading pages in EWW
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.
2025-07-20 13:13:41 -07:00
Jim Porter
49376118a1 Fix EWW <textarea> properties when it's on the same line as other text
* 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.
2025-07-20 13:13:41 -07:00
Jim Porter
49696b5cd1 Make sure we always set the ':readable' state when displaying EWW page
* lisp/net/eww.el (eww-display-html): Always set ':readable'.
* test/lisp/net/eww-tests.el (eww-test/readable/reload-resets-readable):
New test.
2025-07-19 20:24:32 -07:00
Mattias Engdegård
c184ea2441 ; silence some compiler warnings in tests
* test/lisp/savehist-tests.el (savehist-test-saved-variables):
(savehist-test-duplicated-saved-symbols):
* test/src/data-tests.el (binding-test-toplevel-values):
Suppress harmless warnings.
2025-07-19 17:02:28 +02:00
Eli Zaretskii
462a541db9 ; * test/lisp/net/shr-tests.el (shr-test/zoom-image): Fix <img> (bug#79041). 2025-07-17 19:34:50 +03:00
F. Jason Park
9326784b78 ; Skip erc-autojoin-channels--delay test on Solaris
* test/lisp/erc/erc-join-tests.el (erc-autojoin-channels--delay): Skip
for now on Solaris and UnixWare pending further
investigation.  (Bug#79017)
2025-07-16 17:57:28 -07:00
Michael Albinus
4c9b376607 Improve autorevert-tests
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.8.1-pre".

* lisp/autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(auto-revert-notify-handler, auto-revert--end-lockout):
Use `auto-revert-buffer'.
(auto-revert-notify-handler): Rearrange setting current buffer.
(auto-revert-handler): Add debug message.  Rearrange check.
Cancel lockout timer if running.

* lisp/net/tramp.el (tramp-barf-if-file-missing)
(with-parsed-tramp-file-name, tramp-skeleton-file-truename):
* lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name):
* lisp/net/tramp-message.el (tramp-with-demoted-errors):
Fix debug declatation.

* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter): Do not
prepend remote prefix.

* test/lisp/autorevert-tests.el: Unify file notification libraries
"gio-monitor" and "gvfs-monitor-dir" to "gio".
(top): Set some Tramp related variables.
(auto-revert--timeout): Increase value.
(auto-revert--test-enabled-remote)
(auto-revert-test02-auto-revert-deleted-file): Do not check for
EMACS_HYDRA_CI environment variable.
(auto-revert--wait-for-revert): Fix regexp to search for.
(auto-revert--deftest-remote): Fix debug declatation.  Do not tag
:unstable.
(with-auto-revert-test): Fix debug declatation.  Adapt revert intervals.
(auto-revert-test*): Start with (file-notify-rm-all-watches).  Use
`buffer-string' and `string-match-p'.
(auto-revert-test00-auto-revert-mode): Unlock initial lockout.
(auto-revert-test01-auto-revert-several-files): Rearrange
temporary directory and file settings.
(auto-revert-test02-auto-revert-deleted-file): Adapt debug message.
(auto-revert-test03-auto-revert-tail-mode): Use `with-auto-revert-test'.
(auto-revert-test04-auto-revert-mode-dired):
Use `ert-with-temp-directory'.  Adapt prefix of tmpfile.
(auto-revert-test04-auto-revert-mode-dired)
(auto-revert-test05-global-notify, auto-revert-test06-write-file):
Wait for proper file modification.
(auto-revert-test--instrument-kill-buffer-hook): Fix debug message.
(auto-revert-test07-auto-revert-several-buffers): Use
`with-auto-revert-test.

* test/lisp/filenotify-tests.el: Unify file notification libraries
"gio-monitor" and "gvfs-monitor-dir" to "gio".
(file-notify--deftest-remote): Fix debug declatation.  Do not skip
for "gio".
(file-notify--test-with-actions): Fix debug declatation.

* test/lisp/net/tramp-tests.el (filenotify): Require.
(ert-remote-temporary-file-directory)
(tramp-test41-special-characters, tramp-test42-utf8)
(tramp-test45-asynchronous-requests): Do not check for
EMACS_HYDRA_CI environment variable.
(tramp-test46-file-notifications): New test.
2025-07-15 18:57:49 +02:00
Eli Zaretskii
0237e0d1a4 ; * test/lisp/vc/vc-tests/vc-tests.el (vc-test--version-diff): Fix for Bzr. 2025-07-15 19:30:05 +03:00
Alan Mackenzie
c44903b011 Preserve source position of macro calls in macro expansions
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.
2025-07-13 20:28:51 +00:00
Liu Hui
e0270c563a Add option 'ffap-prefer-remote-file' (bug#78925)
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.
2025-07-12 11:48:52 +03:00
Eli Zaretskii
c6ce81c15d Revert "Add option 'ffap-prefer-remote-file' (bug#78925)"
This reverts commit ae46edff68.
I mistakenly installed the wrong version of the patch for
bug#78925.
2025-07-12 11:48:03 +03:00
Liu Hui
ae46edff68 Add option 'ffap-prefer-remote-file' (bug#78925)
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.
2025-07-12 11:38:27 +03:00
Michael Albinus
6d0812e57a Fix browse-url-tests-delete-temp-file
* test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file):
Fix test.
2025-07-10 18:44:52 +02:00
Pip Cet
6a5d9cb07d Call eieio--class-* accessors only on eieio classes (bug#78786)
* 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.
2025-07-09 15:20:14 +00:00