about summary refs log tree commit diff
path: root/users/wpcarro/emacs/pkgs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-08-02T20·25-0700
committerclbot <clbot@tvl.fyi>2022-08-02T20·47+0000
commit844cf6a794d7910524bd7606cae0eef0ba1c4843 (patch)
tree664cc61f64becd74ed72abad4da3237323641581 /users/wpcarro/emacs/pkgs
parent8e16730505b7c6958b2879fc287405ef2a317228 (diff)
refactor(wpcarro/emacs): Remove struct.el dep on s.el r/4373
This removes *all* of `struct.el`'s dependencies, which is liberating.

Change-Id: Ic4a2438714ecf547ba5e07a1f0e77d743941073c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6029
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro/emacs/pkgs')
-rw-r--r--users/wpcarro/emacs/pkgs/struct/default.nix5
-rw-r--r--users/wpcarro/emacs/pkgs/struct/struct.el15
2 files changed, 6 insertions, 14 deletions
diff --git a/users/wpcarro/emacs/pkgs/struct/default.nix b/users/wpcarro/emacs/pkgs/struct/default.nix
index 1b8b27457a66..026bdb61ace2 100644
--- a/users/wpcarro/emacs/pkgs/struct/default.nix
+++ b/users/wpcarro/emacs/pkgs/struct/default.nix
@@ -7,10 +7,7 @@ let
         pname = "struct";
         version = "1.0.0";
         src = ./struct.el;
-        packageRequires =
-          (with emacsPackages; [
-            s
-          ]);
+        packageRequires = [ ];
       })
     { };
 
diff --git a/users/wpcarro/emacs/pkgs/struct/struct.el b/users/wpcarro/emacs/pkgs/struct/struct.el
index 177878c5e1c5..5d6572bf6dde 100644
--- a/users/wpcarro/emacs/pkgs/struct/struct.el
+++ b/users/wpcarro/emacs/pkgs/struct/struct.el
@@ -1,7 +1,7 @@
 ;;; struct.el --- Helpers for working with structs -*- lexical-binding: t -*-
 
 ;; Author: William Carroll <wpcarro@gmail.com>
-;; Version: 0.0.1
+;; Version: 1.0.0
 ;; Package-Requires: ((emacs "24.3"))
 
 ;;; Commentary:
@@ -14,12 +14,6 @@
 ;;; Code:
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Dependencies
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(require 's)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Library
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -60,11 +54,12 @@ This is an adapter interface to `setf'."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defun struct--copier-for (type)
-  (intern (s-prepend "copy-" (symbol-name type))))
+  (intern (format "copy-%s" (symbol-name type))))
 
 (defun struct--accessor-for (type field)
-  (intern (s-prepend (s-concat (symbol-name type) "-")
-                     (symbol-name field))))
+  (intern (format "%s-%s"
+                  (symbol-name type)
+                  (symbol-name field))))
 
 (provide 'struct)
 ;;; struct.el ends here