1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Add inhibit-remote-files and without-remote-files

* doc/emacs/files.texi (Remote Files): Do not document tramp-mode
any longer.  Describe inhibit-remote-files instead.

* doc/lispref/files.texi (Magic File Names): Add without-remote-files.

* doc/misc/tramp.texi (Frequently Asked Questions): Do not
document tramp-mode any longer.  Describe inhibit-remote-files and
without-remote-files instead.

* etc/NEWS: Add inhibit-remote-files and without-remote-files.
Fix typos.

* lisp/net/tramp.el (inhibit-remote-files): New defun.
(without-remote-files): New defmacro.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test49-without-remote-files):
* test/lisp/net/tramp-tests.el (tramp-test49-without-remote-files):
New tests.
(tramp-test50-unload): Rename.
This commit is contained in:
Michael Albinus 2023-07-22 10:16:04 +02:00
parent b6207ee4dc
commit 9069699795
7 changed files with 109 additions and 19 deletions

View file

@ -988,6 +988,20 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
code tae tramp-archive-test-file-archive
(concat tramp-archive-test-archive "foo"))))))))))
(ert-deftest tramp-archive-test49-without-remote-files ()
"Check that Tramp can be suppressed."
(skip-unless tramp-archive-enabled)
(should (file-exists-p tramp-archive-test-archive))
(should-not (without-remote-files (file-exists-p tramp-archive-test-archive)))
(should (file-exists-p tramp-archive-test-archive))
(inhibit-remote-files)
(should-not (file-exists-p tramp-archive-test-archive))
(tramp-register-file-name-handlers)
(setq tramp-mode t)
(should (file-exists-p tramp-archive-test-archive)))
(ert-deftest tramp-archive-test99-libarchive-tests ()
"Run tests of libarchive test files."
:tags '(:expensive-test :unstable)