Removed s.el dependency (prefer built-in)
This commit is contained in:
parent
a07c29c069
commit
07088d3dcf
5 changed files with 8 additions and 14 deletions
|
@ -12,12 +12,6 @@
|
||||||
persistent-soft-flush persistent-soft-store))
|
persistent-soft-flush persistent-soft-store))
|
||||||
(autoload sym "persistent-soft"))
|
(autoload sym "persistent-soft"))
|
||||||
|
|
||||||
(dolist (sym '(s-center s-pad-left s-pad-right s-truncate s-chop-suffix
|
|
||||||
s-chop-suffixes s-chop-prefix s-chop-prefixes s-join s-replace
|
|
||||||
s-replace-all s-capitalize s-titleize s-split-words
|
|
||||||
s-capitalized-words s-titleized-words))
|
|
||||||
(autoload sym "s"))
|
|
||||||
|
|
||||||
(dolist (sym '(when-let if-let string-trim string-join string-blank-p string-lessp))
|
(dolist (sym '(when-let if-let string-trim string-join string-blank-p string-lessp))
|
||||||
(autoload sym "subr-x" nil nil 'macro))
|
(autoload sym "subr-x" nil nil 'macro))
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ Courtesy of esh-mode.el"
|
||||||
(defun +irc|init-lui-wrapping ()
|
(defun +irc|init-lui-wrapping ()
|
||||||
(setq fringes-outside-margins t
|
(setq fringes-outside-margins t
|
||||||
word-wrap t
|
word-wrap t
|
||||||
wrap-prefix (s-repeat (+ +irc-left-padding 3) " ")))
|
wrap-prefix (make-string (+ +irc-left-padding 3) ? )))
|
||||||
|
|
||||||
(add-hook! 'lui-mode-hook #'(+irc|init-lui-margins +irc|init-lui-wrapping)))
|
(add-hook! 'lui-mode-hook #'(+irc|init-lui-margins +irc|init-lui-wrapping)))
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
tmp/
|
tmp/
|
||||||
|
|
||||||
`(let ((type-ignore (yas-choose-value '("(none)" "python" "ruby" "java" "js"))))
|
`(let ((type-ignore (yas-choose-value '("(none)" "python" "ruby" "java" "js"))))
|
||||||
(s-join "\n"
|
(string-join
|
||||||
(cond ((string= type-ignore "python")
|
(cond ((string= type-ignore "python")
|
||||||
'("*.py[cod]"
|
'("*.py[cod]"
|
||||||
"*.egg"
|
"*.egg"
|
||||||
|
@ -20,5 +20,5 @@ tmp/
|
||||||
'("*.class"
|
'("*.class"
|
||||||
"build"))
|
"build"))
|
||||||
((string= type-ignore "js")
|
((string= type-ignore "js")
|
||||||
'("*.tern-port"))
|
'("*.tern-port")))
|
||||||
)))`
|
"\n"))`
|
||||||
|
|
|
@ -13,7 +13,7 @@ RELEASE_FLAGS = -O2 -D NDEBUG -combile -fwhole-program
|
||||||
RELEASE_DIR = ./build/release
|
RELEASE_DIR = ./build/release
|
||||||
DEBUG_DIR = ./build/debug
|
DEBUG_DIR = ./build/debug
|
||||||
|
|
||||||
TARGET = ${1:appname$(s-replace " " "" yas-text)}
|
TARGET = ${1:appname$(replace-regexp-in-string " " "" yas-text nil t)}
|
||||||
HEADERS = \$(shell echo include/*.h)
|
HEADERS = \$(shell echo include/*.h)
|
||||||
SOURCES = \$(shell echo src/*.cpp) \$(shell echo src/**/*.cpp)
|
SOURCES = \$(shell echo src/*.cpp) \$(shell echo src/**/*.cpp)
|
||||||
OBJECTS = \$(SOURCES:.cpp=.o)
|
OBJECTS = \$(SOURCES:.cpp=.o)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# `(progn
|
# `(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 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)))`
|
(concat "lib/" (file-name-nondirectory buffer-file-name)))`
|
||||||
|
|
||||||
module `pkg-module`
|
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}
|
`%`${0:# Code here}
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Add table
Add a link
Reference in a new issue