about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/irc.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-09-02T13·00+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-09-02T13·00+0100
commitc17796a60dba0c81ffb03ad277063a7eee2e1736 (patch)
treebbbecb27c710bdb2c60ababeddfcf064d2ded11b /emacs/.emacs.d/wpc/irc.el
parent1fe5d0373ec90faa2e5c66d399b21d978792e135 (diff)
Rename alist.el to al.el
After switching my namespace separator from "/" to "-" the function,
`alist-get`, clashed (surprise!) with the pre-existing function, `alist-get`. As
I was struggling to debug my broken Emacs (it broke bc Emacs 27 rolled out), and
I changed the module name, "alist", to "al" attempting to defuse the issue.
Diffstat (limited to 'emacs/.emacs.d/wpc/irc.el')
-rw-r--r--emacs/.emacs.d/wpc/irc.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/emacs/.emacs.d/wpc/irc.el b/emacs/.emacs.d/wpc/irc.el
index 1dfffd329b81..ce6f0cfa313b 100644
--- a/emacs/.emacs.d/wpc/irc.el
+++ b/emacs/.emacs.d/wpc/irc.el
@@ -18,7 +18,7 @@
 (require 'cycle)
 (require 'string)
 (require 'prelude)
-(require 'alist)
+(require 'al)
 (require 'set)
 (require 'maybe)
 (require 'macros)
@@ -53,24 +53,24 @@
 (prelude-assert
  (set-distinct? (set-from-list
                  (cycle-to-list
-                  (alist-get "irc.freenode.net"
-                             irc-server->channels)))
+                  (al-get "irc.freenode.net"
+                          irc-server->channels)))
                 (set-from-list
                  (cycle-to-list
-                  (alist-get "irc.corp.google.com"
-                             irc-server->channels)))))
+                  (al-get "irc.corp.google.com"
+                          irc-server->channels)))))
 
 (defun irc-channel->server (server->channels channel)
   "Using SERVER->CHANNELS, resolve an IRC server from a given CHANNEL."
-  (let ((result (alist-find (lambda (k v) (cycle-contains? channel v))
-                            server->channels)))
+  (let ((result (al-find (lambda (k v) (cycle-contains? channel v))
+                         server->channels)))
     (prelude-assert (maybe-some? result))
     result))
 
 (defun irc-channel->cycle (server->channels channel)
   "Using SERVER->CHANNELS, resolve an IRC's channels cycle from CHANNEL."
-  (alist-get (irc-channel->server server->channels channel)
-             server->channels))
+  (al-get (irc-channel->server server->channels channel)
+          server->channels))
 
 ;; Setting `erc-join-buffer' to 'bury prevents erc from stealing focus of the
 ;; current buffer when it connects to IRC servers.
@@ -79,9 +79,9 @@
 ;; TODO: Here is another horrible hack that should be revisted.
 (setq erc-autojoin-channels-alist
       (->> irc-server->channels
-           (alist-map-values #'cycle-to-list)
-           (alist-map-keys (>-> (s-chop-prefix "irc.")
-                                (s-chop-suffix ".net")))))
+           (al-map-values #'cycle-to-list)
+           (al-map-keys (>-> (s-chop-prefix "irc.")
+                             (s-chop-suffix ".net")))))
 
 (defcustom irc-install-kbds? t
   "When t, install the keybindings defined herein.")