summaryrefslogtreecommitdiff
path: root/lisp/auth-source.el
diff options
context:
space:
mode:
authorAndrew G Cohen <cohen@andy.bu.edu>2020-08-27 13:14:26 +0800
committerAndrew G Cohen <cohen@andy.bu.edu>2020-08-27 13:14:26 +0800
commit90ce0421542bf2a983fdb65075c96fa9d7f5e6c9 (patch)
tree15539342edd9ce1847ecc41f448a05ec4631b61d /lisp/auth-source.el
parentf8082a5ccae11508c7eb80ca4d9fabb341985419 (diff)
downloademacs-90ce0421542bf2a983fdb65075c96fa9d7f5e6c9.tar.gz
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.
Diffstat (limited to 'lisp/auth-source.el')
-rw-r--r--lisp/auth-source.el4
1 files changed, 3 insertions, 1 deletions
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'