1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-21 18:23:59 +00:00
Commit Graph

5009 Commits

Author SHA1 Message Date
Michael Albinus
e2c3ce2402 Sync with Tramp 2.5.3.2. Don't merge with master
* doc/misc/tramp.texi (Android shell setup): Rework.
(Frequently Asked Questions): Improve recommendations for speeding up.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.4-pre".

* lisp/net/tramp-adb.el (tramp-methods): Use "%d".
(tramp-adb-handle-directory-files-and-attributes): Fix "." and
".." in listing.
(tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Pipe "ls" output
through "cat", in order to avoid quoting special characters.
(tramp-adb-maybe-open-connection): Compute args from `tramp-login-args'.

* lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region):
New defalias.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Adapt check for proper remote command.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-handle-make-process): Check for adb device if indicated.
(tramp-get-remote-tmpdir): Cache result in temporary connection
property.

* test/lisp/net/tramp-tests.el  (tramp-test17-insert-directory)
(tramp-test22-file-times, tramp--test-utf8): Adapt tests.
(tramp--test-shell-file-name): Do not depend on `tramp--test-adb-p'.
(tramp-test46-unload): Ignore autoload functions in
`tramp-file-name' structure tests, since `tramp-file-name-handler'
is also autoloaded in Emacs 29.
2022-09-17 17:50:38 +02:00
Stefan Kangas
ae1ace1cf4 Adjust help-fns.el tests for recent change
* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun)
(help-fns-test-lisp-defsubst): Adjust tests for recent change.
2022-07-23 00:06:38 +02:00
Stefan Kangas
cb911febc6 ; Fix typos 2022-07-19 14:13:25 +02:00
Stefan Kangas
10b6919870 ; Fix typos 2022-07-16 10:07:38 +02:00
Andrea Corallo
9db6817d63 Remove uneffective test
* test/src/comp-tests.el (45603-1): Remove test.
* test/src/comp-resources/comp-test-45603.el: Delete.
2022-07-13 15:19:27 +02:00
Andrea Corallo
7af88de410 Mark async worker tmp file as utf-8-emacs-unix (bug#48029)
* lisp/emacs-lisp/comp.el (comp-final): Mark async worker tmp file
as utf-8.
* test/src/comp-tests.el (48029-1): New test.
* test/src/comp-resources/comp-test-funcs.el
(comp-test-48029-nonascii-žžž-f): New function.
2022-07-13 15:19:27 +02:00
Stefan Kangas
ba0871bef1 ; Fix typos: prefer American spelling 2022-07-13 13:04:22 +02:00
Stefan Kangas
a772c0b852 ; Fix typos: prefer US spelling. 2022-06-23 22:03:50 +02:00
Michael Albinus
3fd0854378 Fix file name quoting in tramp-smb.el (do not merge)
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Quote tmpfile.
(tramp-smb-get-localname): Remove superfluous test.  (Bug#55855)

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-method-rules):
Remove superfluous checks.
2022-06-09 14:44:00 +02:00
Ken Brown
d02c94090c Fix error reporting in process-async-https-with-delay
* test/src/process-tests.el (process-async-https-with-delay): Use
'plist-get' instead of 'assq' in testing for a connection error.
The 'status' variable is a plist, not an alist.  (Bug#55849)
2022-06-08 13:10:23 -04:00
Michael Albinus
1b7b69e764 Some Tramp cleanup on MS Windows
* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist): Do not add
localhost when `tramp-encoding-shell' is a POSIX shell.

* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process):
Skip on MS Windows.
2022-05-29 13:31:32 +02:00
Michael Albinus
fa6a0962c5 Fix Tramp sshfs tests (don't merge)
* test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare.
(tramp-test16-directory-files)
(tramp-test16-file-expand-wildcards)
(tramp-test26-file-name-completion, tramp--test-check-files): Use it.
(tramp--test-check-files): Delete directory recursively.
2022-05-17 09:14:36 +02:00
Michael Albinus
950dab21e3 * test/lisp/net/tramp-tests.el (tramp-test27-load): Adapt test. Don't merge 2022-05-15 09:02:42 +02:00
Michael Albinus
886339747b Extend tramp-archive-test45-auto-load
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load):
Extend test.
2022-04-08 13:12:26 +02:00
Michael Albinus
009e88e002 Merge with Tramp 2.5.2.3 (Do not merge with master)
* doc/misc/tramp.texi (Archive file names): Explicitly say how to
open an archive with Tramp (Bug#25076).

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.3-pre".

* lisp/net/tramp-adb.el (tramp-adb-handle-process-file)
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve implementation.  (Bug#53854)

* lisp/net/tramp-adb.el (tramp-adb-tolerate-tilde):
* lisp/net/tramp-sshfs.el (tramp-sshfs-tolerate-tilde):
New defuns.  Advice `shell-mode' with them.

* lisp/net/tramp.el (tramp-register-autoload-file-name-handlers):
* lisp/net/tramp-archive.el (tramp-register-archive-file-name-handler):
Check, whether the real file name handler is already registered.
rules.  (Bug#54542)

* lisp/net/tramp.el (tramp-autoload-file-name-handler)
(tramp-register-autoload-file-name-handlers)
(tramp-unload-file-name-handlers, tramp-unload-tramp):
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp)
(tramp-archive-autoload-file-name-handler)
(tramp-register-archive-file-name-handler):
Add `tramp-autoload' property.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-handle-file-notify-add-watch',
`tramp-handle-file-notify-rm-watch' and
`tramp-handle-file-notify-valid-p'.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Use `tramp-handle-insert-file-contents'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection): Do not
set "lock-pid" connection-property.
(tramp-sudoedit-handle-delete-file): Use "rm -f".

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for setuid/setgid bit.
(tramp-gvfs-handle-expand-file-name):
Respect `tramp-tolerate-tilde'.

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Do not modify disk space information when
`dired--insert-disk-space' is available.  (Bug#54512)

* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Extend suppression
(tramp-get-remote-dev-tty): New defun.
(tramp-sh-handle-make-process): Use it.

* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>:
Add "-t -t" to `tramp-login-args'.
Add "-o dir_cache=no" to `tramp-mount-args'.  (Bug#54126)
Add "-o transform_symlinks" to `tramp-mount-args'.
(tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-file-writable-p'.
(tramp-sshfs-handle-file-writable-p): New defun.  (Bug#54130)
(tramp-sshfs-handle-write-region): Set file modification time.
(Bug#54016)
(tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-set-file-times'.
(tramp-sshfs-handle-set-file-times): New defun.

* test/lisp/net/tramp-tests.el (tramp--test-expensive-test-p):
Rename from `tramp--test-expensive-test'.  Make it a defun.  Adapt
all callees.
(tramp-test07-file-exists-p, tramp-test14-delete-directory)
(tramp-test18-file-attributes, tramp-test20-file-modes)
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test32-shell-command)
(tramp-test33-environment-variables, tramp--test-check-files)
(tramp--test-special-characters, tramp-test46-unload): Adapt tests.
(tramp-test39-detect-external-change): New test.
(tramp-test29-start-file-process)
(tramp--test--deftest-direct-async-process)
(tramp-test30-make-process, tramp-test31-interrupt-process)
(tramp-test34-explicit-shell-file-name)
(tramp-test44-asynchronous-requests):
Add :tramp-asynchronous-processes tag.
(tramp--test-asynchronous-processes-p): New defun.
(tramp--test-hpux-p, tramp--test-macos-p): Protect against errors.
2022-04-07 11:17:52 +02:00
Jim Porter
9e257aecc9 Partially revert b03f74e0f2
That commit regressed '$<command>' forms in Eshell, due to a
limitation/bug in how 'eshell-do-eval' works.  This fixes
bug#54190.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Quote a lambda.

* test/lisp/eshell/eshell-tests.el (eshell-test/interp-temp-cmd):
New test.
2022-03-01 15:01:16 +02:00
Andrea Corallo
69e82968d7 Fix integer arithmetic miss-compilation (bug#53451)
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-range-for-arithm):
When one of the two sources is negated revert to set dst as
number.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add test to
verify this is effective.
2022-02-09 17:58:57 +01:00
Lars Ingebrigtsen
c9524819ea Partially revert a fill-region-as-paragraph regression
* lisp/textmodes/fill.el (fill-region-as-paragraph): Revert
e186af261 (bug#53537), because it leads to regressions.  (But
leave tests in place.)
2022-01-26 16:20:05 +01:00
Lars Ingebrigtsen
c5b0019e10 Fix copyright-find-copyright when searching from the end
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).

Do not merge to master.
2022-01-26 15:03:56 +01:00
Lars Ingebrigtsen
ed18d08f6f Fix copyright.el comment and add a test
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).

Do not merge to master.
2022-01-26 15:03:33 +01:00
Philipp Stephani
2dcb1bc474 Mark a few more map tests as unstable on Emacs 28 (Bug#46722).
At least for me, these tests still occasionally fail.

Do not merge to master.

* test/lisp/emacs-lisp/map-tests.el (test-map-into-hash-test)
(test-map-merge, test-map-merge-with, test-map-merge-empty): Mark as
unstable.
2022-01-15 12:40:09 +01:00
Lars Ingebrigtsen
281b878858 Mark test-map-into as unstable
* test/lisp/emacs-lisp/map-tests.el (test-map-into): Mark as
unstable (bug#46722).

Do not merge to master.
2022-01-14 08:39:57 +01:00
Philipp Stephani
34ca4ff9a5 Fix Edebug specification for inline functions (Bug#53068).
* lisp/emacs-lisp/inline.el (inline-quote): Fix Edebug specification.

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-inline): New unit
test.
2022-01-13 13:52:40 +01:00
Mattias Engdegård
22ddd2ba13 Revert "Fix closure-conversion of shadowed captured lambda-lifted vars"
This reverts commit 3ec8c8b3ae.

It was committed to a stable branch without prior discussion;
see bug#53071.
2022-01-12 20:23:09 +01:00
Mattias Engdegård
3ec8c8b3ae Fix closure-conversion of shadowed captured lambda-lifted vars
Lambda-lifted variables (ones passed explicitly to lambda-lifted
functions) that are also captured in an outer closure and shadowed
were renamed incorrectly (bug#51982).

Reported by Paul Pogonyshev.

* lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New.
(cconv-convert): Provide correct definiens for the closed-over
variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
* test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all)
(cconv-closure-convert-remap-var): Add tests.

(cherry picked from commit 45252ad8f9)
2022-01-12 16:51:01 +01:00
Philipp Stephani
ad82bbdf08 Fix test lisp/cedet/semantic/bovine/gcc-tests on macOS (Bug#52431)
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): Also detect Apple
clang on macOS Monterey.

(cherry picked from commit 6e52becfbe)
2022-01-12 09:08:33 +01:00
Mattias Engdegård
5e66166714 Don't fail flymake-tests if gcc actually is Clang
* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang)
(different-diagnostic-types, included-c-header-files): Skip tests that
depend on the `gcc` command really being GCC and not Clang.

(cherry picked from commit b2167d9843)
2022-01-12 09:08:33 +01:00
Stefan Kangas
8db5f82d45 ; Fix tabulated-list-mode tests after revert
* test/lisp/emacs-lisp/tabulated-list-tests.el
(tabulated-list-print, tabulated-list-sort): Fix tests.
2022-01-11 06:17:59 +01:00
Stefan Monnier
74223bbdaf (save-some-buffers): Simplify the fix for bug#46374
* lisp/files.el (save-some-buffers): Only check the
`save-some-buffers-function` property on functions from
`save-some-buffers-default-predicate` since callers which provide
a `pred` argument can arrange to compute `pred` themselves if needed.

* test/lisp/files-tests.el (files-tests-buffer-offer-save): Don't test
with `pred` set to `save-some-buffers-root` since it's not an
appropriate function for that any more.
2022-01-09 22:17:45 -05:00
Glenn Morris
f475c5823a ; Copyright year fixes 2022-01-01 10:02:17 -08:00
Eli Zaretskii
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright years change. 2022-01-01 05:19:17 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Lars Ingebrigtsen
29fffbdd87 Revert field-related thingatpt changes
This reverts 7db376e560, which led to
severe performance regressions when being run in large buffers with no
fields (bug#52593)
2021-12-22 13:56:47 +01:00
Kévin Le Gouguec
9bd3f78645 Make `M-x run-python' select the window again
Interactively, we want M-x run-python to focus the interpreter buffer.
The previous code failed in two ways:

- the call to 'display-buffer' was not reached if an interpreter
  was already running,

- set-buffer is ineffectual if the interpreter's window is not
  selected: once Emacs returns to the command loop, the current buffer
  will revert back to what the selected window contains.

* lisp/progmodes/python.el (python-shell-make-comint): Handle the SHOW
argument regardless of whether an interpreter buffer exists, and use
pop-to-buffer to select the window.
(run-python): Delegate buffer management to
'python-shell-make-comint'.

* test/lisp/progmodes/python-tests.el
(python-tests--run-python-selects-window): Rename from
'python-tests--bug31398', and adjust assertions (bug#52380).
2021-12-13 05:17:00 +01:00
Glenn Morris
0bf10d5082 * test/Makefile.in (check-declare): Add missing --batch. 2021-12-05 10:27:18 -08:00
Juri Linkov
0a50ad11db * lisp/tab-bar.el (tab-bar-close-other-tabs): Fix regression.
* test/lisp/tab-bar-tests.el: New file.
(tab-bar-tests-close-other-tabs-with-arg): Test for regression
that closed the selected tab after selecting it.
2021-12-02 20:12:05 +02:00
Juri Linkov
ea5a90b4f4 * lisp/repeat.el: Fix long-standing problem when a random key activates map
* lisp/repeat.el (repeat-check-key): New defcustom (bug#51390).
(repeat--command-property): New internal function.
(repeat-check-key): New function.
(repeat-post-hook): Use repeat--command-property and repeat-check-key.

* test/lisp/repeat-tests.el (repeat-tests-check-key): New test.
2021-11-30 21:07:18 +02:00
Juri Linkov
6d5886e780 * test/lisp/repeat-tests.el (repeat-tests-call-b): Test for commit 588caf0b27.
This tests for 'repeat-map' as a variable instead of a symbol.
2021-11-30 21:07:18 +02:00
Michael Albinus
764ffa76ed Backport Tramp fixes, don't merge
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-handle-file-readable-p'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test02-file-name-dissect): Use `make-tramp-file-name'.
2021-11-24 16:54:59 +01:00
Michael Albinus
c1eea85be1 * test/lisp/net/tramp-tests.el (tramp-get-remote-gid): Remove declaration. 2021-11-19 18:58:01 +01:00
Stefan Kangas
42d4e24ff3 ; Fix typos 2021-11-12 13:59:58 +01:00
Stephen Gildea
8d81ab374d time-stamp: %F is "file name" not "pathname" + other doc
* lisp/time-stamp.el (time-stamp-format): doc 'file' instead of 'path'.
* test/lisp/time-stamp-tests.el (formatz, format-time-offset):
Clarify the difference and similarity between these two test helpers.
2021-11-09 20:11:07 -08:00
Jim Porter
7fdb2ae412 Add some unit tests for 'abbreviate-file-name'
* test/lisp/files-tests.el (files-tests-abbreviate-file-name-homedir)
(files-tests-abbreviate-file-name-directory-abbrev-alist): New tests.
2021-11-07 18:03:23 +01:00
Michael Albinus
5e9b4e70ab Fix dbus-test04-register-method on CentOS (Bug#51369)
* test/lisp/net/dbus-tests.el (dbus-test04-register-method):
Fix problem on CentOS.  (Bug#51369)
2021-11-06 17:25:19 +01:00
Michael Albinus
84cd95e04c Fix bug#51369
* test/lisp/net/dbus-tests.el (dbus-test04-register-method): Skip on hydra.
2021-11-01 13:22:28 +01:00
Michael Albinus
00103154e0 Some Tramp changes, mainly in tramp-tests.el
* doc/misc/tramp.texi (External packages): Don't use Tramp internals.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted):
Protect `tramp-make-tramp-file-name' call.

* lisp/net/tramp.el (tramp-make-tramp-file-name): Set advertised
calling conventions.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes):
Adapt test.
(tramp--test-supports-processes-p): New defun.
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test32-shell-command)
(tramp-test32-shell-command-dont-erase-buffer)
(tramp-test34-explicit-shell-file-name, tramp-test35-exec-path)
(tramp-test44-asynchronous-requests): Use it.
2021-10-29 14:06:47 +02:00
Stefan Kangas
0f8417d597 Be more allowing when looking for menu-bar items
Don't merge to master.  This is a safe-for-release fix for Bug#50752.

* src/keymap.c (lookup_key_1): Factor out function from
Flookup_key.
(Flookup_key): Be case insensitive when looking for Qmenu_bar
items.  (Bug#50752)

* test/src/keymap-tests.el
(keymap-lookup-key/mixed-case)
(keymap-lookup-key/mixed-case-multibyte): New tests.
2021-10-28 12:30:42 +02:00
Juri Linkov
ee579033b9 * test/lisp/repeat-tests.el: New file. 2021-10-24 22:22:16 +03:00
Stephen Gildea
5ecbed01b2 ; * test/lisp/mh-e/mh-utils-tests.el: Update macro declarations. 2021-10-22 08:48:07 -07:00
Stephen Gildea
efde024361 time-stamp-tests: improvements to test macros
test/lisp/time-stamp-tests.el: Update macro declarations.
(formatz-generate-tests): Don't nconc onto a constant list.
Tests now run 12% faster in batch mode.
2021-10-22 08:39:05 -07:00