summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2024-06-12 10:24:34 +0200
committerMichael Albinus <michael.albinus@gmx.de>2024-06-12 10:24:34 +0200
commit59261e6f4fef0ec03c8127b29fe107ed19280a3b (patch)
treeab802365ded3e577f47657ee4005b60dc20c805e
parent778f8c793d1c621fc8219644797ef44425bf0bb4 (diff)
downloademacs-59261e6f4fef0ec03c8127b29fe107ed19280a3b.tar.gz
emacs-59261e6f4fef0ec03c8127b29fe107ed19280a3b.tar.bz2
emacs-59261e6f4fef0ec03c8127b29fe107ed19280a3b.zip
Fix auth-info-password
* lisp/auth-source.el (auth-info-password): :secret can be a cascaded function.
-rw-r--r--lisp/auth-source.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 5969cdbf9f8..4dcf7d73717 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -874,9 +874,9 @@ while \(:host t) would find all host entries."
(defun auth-info-password (auth-info)
"Return the :secret password from the AUTH-INFO."
(let ((secret (plist-get auth-info :secret)))
- (if (functionp secret)
- (funcall secret)
- secret)))
+ (while (functionp secret)
+ (setq secret (funcall secret)))
+ secret))
(defun auth-source-pick-first-password (&rest spec)
"Pick the first secret found by applying `auth-source-search' to SPEC."