mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
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.
This commit is contained in:
parent
a80125ae37
commit
9652736b08
2 changed files with 12 additions and 1 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue