* lisp/net/tramp-compat.el (tramp-compat-auth-info-password):
New defalias.
* lisp/net/tramp.el (tramp-read-passwd): Use it.
(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))
:create t))
tramp-password-save-function
(plist-get auth-info :save-function)
- auth-passwd (auth-info-password auth-info))))
+ auth-passwd
+ (tramp-compat-auth-info-password auth-info))))
;; Try the password cache.
(progn