diff options
| author | Michael Albinus <michael.albinus@gmx.de> | 2020-06-08 10:18:35 +0200 |
|---|---|---|
| committer | Michael Albinus <michael.albinus@gmx.de> | 2020-06-08 10:18:35 +0200 |
| commit | 46304c474c433a98ad55198e1fbdb0b1136645c1 (patch) | |
| tree | c79325025ad5c790dc3d2bce74ae0f99583c980c /lisp | |
| parent | 80abaea1d9c6f1e53fe88befe16de3b219cdd919 (diff) | |
| download | emacs-46304c474c433a98ad55198e1fbdb0b1136645c1.tar.gz | |
Add autoload problem in tramp-crypt.el.
* lisp/net/tramp-crypt.el (tramp-crypt-encfs-config):
Add ;;;###tramp-autoload cookie.
(tramp-crypt-directories): Move it up.
(tramp-crypt-file-name-p): Move it up. Add ;;;###tramp-autoload
cookie. Make it a defsubst.
* test/lisp/net/tramp-tests.el (tramp-crypt): Do not require.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/net/tramp-crypt.el | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 1df38c3121b..220a4add91f 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el @@ -114,6 +114,7 @@ initializing a new crypted remote directory." "Non-nil when encryption support is available.") (setq tramp-crypt-enabled (executable-find tramp-crypt-encfs-program)) +;;;###tramp-autoload (defconst tramp-crypt-encfs-config ".encfs6.xml" "Encfs configuration file name.") @@ -123,6 +124,25 @@ initializing a new crypted remote directory." :version "28.1" :type 'booleanp) +;;;###tramp-autoload +(defvar tramp-crypt-directories nil + "List of crypted remote directories.") + +;; It must be a `defsubst' in order to push the whole code into +;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading. +;;;###tramp-autoload +(defsubst tramp-crypt-file-name-p (name) + "Return the crypted remote directory NAME belongs to. +If NAME doesn't belong to a crypted remote directory, retun nil." + (catch 'crypt-file-name-p + (and tramp-crypt-enabled (stringp name) + (not (tramp-compat-file-name-quoted-p name)) + (not (string-suffix-p tramp-crypt-encfs-config name)) + (dolist (dir tramp-crypt-directories) + (and (string-prefix-p + dir (file-name-as-directory (expand-file-name name))) + (throw 'crypt-file-name-p dir)))))) + ;; New handlers should be added here. ;;;###tramp-autoload @@ -249,22 +269,6 @@ arguments to pass to the OPERATION." ;; File name conversions. -;;;###tramp-autoload -(defvar tramp-crypt-directories nil - "List of crypted remote directories.") - -(defun tramp-crypt-file-name-p (name) - "Return the crypted remote directory NAME belongs to. -If NAME doesn't belong to a crypted remote directory, retun nil." - (catch 'crypt-file-name-p - (and tramp-crypt-enabled (stringp name) - (not (tramp-compat-file-name-quoted-p name)) - (not (string-suffix-p tramp-crypt-encfs-config name)) - (dolist (dir tramp-crypt-directories) - (and (string-prefix-p - dir (file-name-as-directory (expand-file-name name))) - (throw 'crypt-file-name-p dir)))))) - (defun tramp-crypt-config-file-name (vec) "Return the encfs config file name for VEC." (expand-file-name |
