diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2022-01-08 13:38:18 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2022-01-08 13:38:18 +0100 |
commit | 9652736b084a09133e983e204eaa29573c0359cc (patch) | |
tree | 82b195c80d9d54d03488fe4be82df5c52912ccd6 /lisp/net/tramp-compat.el | |
parent | a80125ae370e001ffced20a07daea45eddea73c9 (diff) | |
download | emacs-9652736b084a09133e983e204eaa29573c0359cc.tar.gz emacs-9652736b084a09133e983e204eaa29573c0359cc.tar.bz2 emacs-9652736b084a09133e983e204eaa29573c0359cc.zip |
Adapt Tramp for `auth-info-password'
* lisp/net/tramp-compat.el (tramp-compat-auth-info-password):
New defalias.
* lisp/net/tramp.el (tramp-read-passwd): Use it.
Diffstat (limited to 'lisp/net/tramp-compat.el')
-rw-r--r-- | lisp/net/tramp-compat.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 0a45b12a04a..db7e7d67c4d 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -283,6 +283,16 @@ CONDITION can also be a list of error conditions." (tramp-error vec tramp-permission-denied file) (tramp-error vec tramp-permission-denied "Permission denied: %s" file))) +;; Function `auth-info-password' is new in Emacs 29.1. +(defalias 'tramp-compat-auth-info-password + (if (fboundp 'auth-info-password) + #'auth-info-password + (lambda (auth-info) + (let ((secret (plist-get auth-info :secret))) + (while (functionp secret) + (setq secret (funcall secret))) + secret)))) + (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) (put (intern elt) 'tramp-suppress-trace t)) |