Removed s.el dependency (prefer built-in)

This commit is contained in:
Henrik Lissner 2017-12-09 14:40:14 -05:00
parent a07c29c069
commit 07088d3dcf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 8 additions and 14 deletions

View file

@ -1,12 +1,12 @@
# `(progn
(setq-local pkgs (split-string (s-chop-prefix (concat (doom-project-root) "lib/") (file-name-sans-extension buffer-file-name)) "/" t))
(setq-local pkgs (split-string (string-remove-prefix (concat (doom-project-root) "lib/") (file-name-sans-extension buffer-file-name)) "/" t))
(setq-local pkgs-p (eq (length pkgs) 1))
(setq-local pkg-module (s-replace " " "::" (s-titleized-words (if pkgs-p (car pkgs) (string-join (butlast pkgs) " ")))))
(setq-local pkg-module (replace-regexp-in-string " " "::" (capitalize (if pkgs-p (car pkgs) (string-join (butlast pkgs) " "))) nil t))
(concat "lib/" (file-name-nondirectory buffer-file-name)))`
module `pkg-module`
`(when pkgs-p " VERSION='0.0.1'\n\n")``(concat " class " (if pkgs-p "<< self" (s-capitalize (car (last pkgs)))))`
`(when pkgs-p " VERSION='0.0.1'\n\n")``(concat " class " (if pkgs-p "<< self" (capitalize (car (last pkgs)))))`
`%`${0:# Code here}
end
end