refactor(wpcarro/emacs): Remove struct.el dep on s.el
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>
This commit is contained in:
parent
8e16730505
commit
844cf6a794
2 changed files with 6 additions and 14 deletions
|
@ -7,10 +7,7 @@ let
|
|||
pname = "struct";
|
||||
version = "1.0.0";
|
||||
src = ./struct.el;
|
||||
packageRequires =
|
||||
(with emacsPackages; [
|
||||
s
|
||||
]);
|
||||
packageRequires = [ ];
|
||||
})
|
||||
{ };
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
@ -13,12 +13,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
|
||||
|
|
Loading…
Reference in a new issue