From 9bbc43a4557adcfafe75c3970c16c5102bfdf195 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 1 Sep 2021 17:14:44 -0500 Subject: Add acdw/fetch-password and circe network configuration --- lisp/acdw.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/acdw.el b/lisp/acdw.el index f23ca0e..796c2f1 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -579,7 +579,18 @@ It's called 'require-private' for historical reasons." (switch-to-buffer nil) (other-window (or arg 1)))) - + +;;; Auth-sources +;; https://github.com/emacs-circe/circe/wiki/Configuration +(defun acdw/fetch-password (&rest params) + (require 'auth-source) + (let ((match (car (apply #'auth-source-search params)))) + (if match + (let ((secret (plist-get match :secret))) + (if (functionp secret) + (funcall secret) + secret)) + (warn "Password not found for %S" params)))) (provide 'acdw) ;;; acdw.el ends here -- cgit 1.4.1-21-gabe81