From: Andrew G Cohen Date: Thu, 27 Aug 2020 05:14:26 +0000 (+0800) Subject: Allow a function for the :secret in a plstore X-Git-Tag: emacs-28.0.90~6364 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90ce0421542bf2a983fdb65075c96fa9d7f5e6c9;p=emacs.git 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. --- 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'