From 90ce0421542bf2a983fdb65075c96fa9d7f5e6c9 Mon Sep 17 00:00:00 2001 From: Andrew G Cohen Date: Thu, 27 Aug 2020 13:14:26 +0800 Subject: [PATCH] Allow a function for the :secret in a plstore * lisp/auth-source.el (auth-source-plstore-search): If the :secret value is a function, call it on plist to obtain the real password. --- lisp/auth-source.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 7a0e09b9e8e..50795ce7946 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -2073,7 +2073,9 @@ entries for git.gnus.org: (setcar (cdr secret) (let ((v (car (cdr secret)))) - (lambda () v)))) + (if (functionp v) + (lambda () (funcall v plist)) + (lambda () v))))) plist)) items)) ;; ensure each item has each key in `returned-keys' -- 2.39.2