about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/scope.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/scope.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/scope.el')
-rw-r--r--emacs/.emacs.d/wpc/scope.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/emacs/.emacs.d/wpc/scope.el b/emacs/.emacs.d/wpc/scope.el
index e8a2ad2ecc..267baac9fb 100644
--- a/emacs/.emacs.d/wpc/scope.el
+++ b/emacs/.emacs.d/wpc/scope.el
@@ -17,7 +17,7 @@
 ;; Dependencies
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(require 'alist)
+(require 'al)
 (require 'stack)
 (require 'struct)
 (require '>)
@@ -31,7 +31,7 @@
 (defun scope-new ()
   "Return an empty scope."
   (make-scope :scopes (->> (stack-new)
-                           (stack-push (alist-new)))))
+                           (stack-push (al-new)))))
 
 (defun scope-flatten (xs)
   "Return a flattened representation of the scope, XS.
@@ -39,15 +39,15 @@ The newest bindings eclipse the oldest."
   (->> xs
        scope-scopes
        stack-to-list
-       (list-reduce (alist-new)
+       (list-reduce (al-new)
                     (lambda (scope acc)
-                      (alist-merge acc scope)))))
+                      (al-merge acc scope)))))
 
 (defun scope-push-new (xs)
   "Push a new, empty scope onto XS."
   (struct-update scope
                  scopes
-                 (>-> (stack-push (alist-new)))
+                 (>-> (stack-push (al-new)))
                  xs))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -58,7 +58,7 @@ The newest bindings eclipse the oldest."
   "Return K from XS if it's in scope."
   (->> xs
        scope-flatten
-       (alist-get k)))
+       (al-get k)))
 
 (defun scope-current (xs)
   "Return the newest scope from XS."
@@ -75,7 +75,7 @@ The newest bindings eclipse the oldest."
   "Set value, V, at key, K, in XS for the current scope."
   (struct-update scope
                  scopes
-                 (>-> (stack-map-top (>-> (alist-set k v))))
+                 (>-> (stack-map-top (>-> (al-set k v))))
                  xs))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -96,7 +96,7 @@ The newest bindings eclipse the oldest."
   "Return t if K is in scope of XS."
   (->> xs
        scope-flatten
-       (alist-has-key? k)))
+       (al-has-key? k)))
 
 ;; TODO: Find a faster way to write aliases like this.
 (defun scope-instance? (xs)