summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el13
-rw-r--r--lisp/acdw.el6
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."
1229 `(("Libera Chat" 1229 `(("Libera Chat"
1230 :channels ("#emacs" "#systemcrafters" "##webpals") 1230 :channels ("#emacs" "#systemcrafters" "##webpals")
1231 :sasl-username "acdw" 1231 :sasl-username "acdw"
1232 :sasl-password ,(acdw/fetch-password :host "libera.chat")) 1232 :sasl-password ,(acdw/make-password-fetcher
1233 :host "libera.chat"))
1233 ("Tilde Chat" 1234 ("Tilde Chat"
1234 :channels ("#meta" "#bread" "#dadjokes" "#team") 1235 :channels ("#meta" "#bread" "#dadjokes" "#team")
1235 :host "irc.tilde.chat" :port 6697 :use-tls t 1236 :host "irc.tilde.chat" :port 6697 :use-tls t
1236 :sasl-username "acdw" 1237 :sasl-username "acdw"
1237 :sasl-password ,(acdw/fetch-password :host "tilde.chat")) 1238 :sasl-password ,(acdw/make-password-fetcher
1239 :host "tilde.chat"))
1238 ("Casa" 1240 ("Casa"
1239 :channels ("#basement") 1241 :channels ("#basement")
1240 :host "m455.casa" :port 6697 :use-tls t 1242 :host "m455.casa" :port 6697 :use-tls t
1241 :sasl-username "acdw" 1243 :sasl-username "acdw"
1242 :sasl-password ,(acdw/fetch-password :host "m455.casa"))) 1244 :sasl-password ,(acdw/make-password-fetcher
1245 :host "m455.casa"))
1246 ("Piss"
1247 :host "piss.hmm.st" :port 6697 :use-tls t))
1243 circe-reduce-lurker-spam t 1248 circe-reduce-lurker-spam t
1244 circe-server-auto-join-default-type :after-auth) 1249 circe-server-auto-join-default-type :after-auth)
1245 1250
@@ -1358,7 +1363,7 @@ like a dumbass."
1358 (:option elfeed-use-curl t 1363 (:option elfeed-use-curl t
1359 elfeed-feeds `(("fever+https://acdw@mf.acdw.net" 1364 elfeed-feeds `(("fever+https://acdw@mf.acdw.net"
1360 :api-url "https://mf.acdw.net/fever/" 1365 :api-url "https://mf.acdw.net/fever/"
1361 :password ,(acdw/fetch-password 1366 :password ,(acdw/make-password-fetcher
1362 :host "mf.acdw.net")))) 1367 :host "mf.acdw.net"))))
1363 1368
1364 (elfeed-protocol-enable) 1369 (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."
593;;; Auth-sources 593;;; Auth-sources
594;; https://github.com/emacs-circe/circe/wiki/Configuration 594;; https://github.com/emacs-circe/circe/wiki/Configuration
595(defun acdw/fetch-password (&rest params) 595(defun acdw/fetch-password (&rest params)
596 "Fetch a password from `auth-source'."
596 (require 'auth-source) 597 (require 'auth-source)
597 (let ((match (car (apply #'auth-source-search params)))) 598 (let ((match (car (apply #'auth-source-search params))))
598 (if match 599 (if match
@@ -602,6 +603,11 @@ It's called 'require-private' for historical reasons."
602 secret)) 603 secret))
603 (message "Password not found for %S" params)))) 604 (message "Password not found for %S" params))))
604 605
606(defun acdw/make-password-fetcher (&rest params)
607 "Make a function that will fetch a password using `acdw/fetch-password'."
608 (lambda (&rest _)
609 (apply #'acdw/fetch-password params)))
610
605 611
606;;; Paren annoyances 612;;; Paren annoyances
607(defun acdw/stop-paren-annoyances (&optional buffer) 613(defun acdw/stop-paren-annoyances (&optional buffer)