From c4eb3a9841b4aef775f5ce3b04dde4e7354bd957 Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Thu, 2 Sep 2021 23:51:36 -0500
Subject: Change to acdw/make-password-fetcher

---
 init.el      | 13 +++++++++----
 lisp/acdw.el |  6 ++++++
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/init.el b/init.el
index e70fd36..24a1ce1 100644
--- a/init.el
+++ b/init.el
@@ -1229,17 +1229,22 @@ like a dumbass."
            `(("Libera Chat"
               :channels ("#emacs" "#systemcrafters" "##webpals")
               :sasl-username "acdw"
-              :sasl-password ,(acdw/fetch-password :host "libera.chat"))
+              :sasl-password ,(acdw/make-password-fetcher
+                               :host "libera.chat"))
              ("Tilde Chat"
               :channels ("#meta" "#bread" "#dadjokes" "#team")
               :host "irc.tilde.chat" :port 6697 :use-tls t
               :sasl-username "acdw"
-              :sasl-password ,(acdw/fetch-password :host "tilde.chat"))
+              :sasl-password ,(acdw/make-password-fetcher
+                               :host "tilde.chat"))
              ("Casa"
               :channels ("#basement")
               :host "m455.casa" :port 6697 :use-tls t
               :sasl-username "acdw"
-              :sasl-password ,(acdw/fetch-password :host "m455.casa")))
+              :sasl-password ,(acdw/make-password-fetcher
+                               :host "m455.casa"))
+             ("Piss"
+              :host "piss.hmm.st" :port 6697 :use-tls t))
            circe-reduce-lurker-spam t
            circe-server-auto-join-default-type :after-auth)
 
@@ -1358,7 +1363,7 @@ like a dumbass."
   (:option elfeed-use-curl t
            elfeed-feeds `(("fever+https://acdw@mf.acdw.net"
                            :api-url "https://mf.acdw.net/fever/"
-                           :password ,(acdw/fetch-password
+                           :password ,(acdw/make-password-fetcher
                                        :host "mf.acdw.net"))))
 
   (elfeed-protocol-enable)
diff --git a/lisp/acdw.el b/lisp/acdw.el
index 2acef4f..ded65f8 100644
--- a/lisp/acdw.el
+++ b/lisp/acdw.el
@@ -593,6 +593,7 @@ It's called 'require-private' for historical reasons."
 ;;; Auth-sources
 ;; https://github.com/emacs-circe/circe/wiki/Configuration
 (defun acdw/fetch-password (&rest params)
+  "Fetch a password from `auth-source'."
   (require 'auth-source)
   (let ((match (car (apply #'auth-source-search params))))
     (if match
@@ -602,6 +603,11 @@ It's called 'require-private' for historical reasons."
             secret))
       (message "Password not found for %S" params))))
 
+(defun acdw/make-password-fetcher (&rest params)
+  "Make a function that will fetch a password using `acdw/fetch-password'."
+  (lambda (&rest _)
+    (apply #'acdw/fetch-password params)))
+
 
 ;;; Paren annoyances
 (defun acdw/stop-paren-annoyances (&optional buffer)
-- 
cgit 1.4.1-21-gabe81