]> git.eshelyaron.com Git - emacs.git/commit
Prevent loading tramp-archive when it cannot be used
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 3 Feb 2018 17:49:56 +0000 (18:49 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 3 Feb 2018 17:49:56 +0000 (18:49 +0100)
commita2cb52cd2e7c497df51d751b91b331f59f9637e7
tree837fb576472a2ca5b0fc283a3f30eb496f6dc871
parentf7c8a12b12f5344100d3da192c0ec80f69ed55a9
Prevent loading tramp-archive when it cannot be used

* lisp/files.el (locate-dominating-file): Check, that FILE is
a directory when traversing the tree.

* lisp/net/tramp-archive.el (tramp-archive-enabled): New defvar.
(tramp-archive-file-name-regexp): Protect against errors.
(tramp-archive-file-name-handler)
(tramp-register-archive-file-name-handler): Use it.
(all) Call `tramp-register-archive-file-name-handler'.

* lisp/net/tramp.el (tramp-register-file-name-handlers):
Use `tramp-archive-enabled'.

* test/lisp/net/tramp-archive-tests.el (all):
Use `tramp-archive-enabled' instead of `tramp-gvfs-enabled'.
(tramp-archive--test-emacs27-p): New defun.
(tramp-archive-test42-auto-load): Skip for older Emacsen.
(tramp-archive-test42-delay-load): Skip for older Emacsen.
Test also behavior when `tramp-archive-enabled' is nil.
lisp/files.el
lisp/net/tramp-archive.el
lisp/net/tramp.el
test/lisp/net/tramp-archive-tests.el