]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow a function for the :secret in a plstore
authorAndrew G Cohen <cohen@andy.bu.edu>
Thu, 27 Aug 2020 05:14:26 +0000 (13:14 +0800)
committerAndrew G Cohen <cohen@andy.bu.edu>
Thu, 27 Aug 2020 05:14:26 +0000 (13:14 +0800)
* 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

index 7a0e09b9e8eba474e837e60fc486aedc9ebc54fb..50795ce79463381934697256a7959a4aa8cc81bc 100644 (file)
@@ -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'