From 07088d3dcf702d9d6c514da1ed5772a1f39f78e4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Dec 2017 14:40:14 -0500 Subject: [PATCH] Removed s.el dependency (prefer built-in) --- core/core-lib.el | 6 ------ modules/app/irc/config.el | 2 +- modules/feature/file-templates/templates/gitignore-mode/__ | 6 +++--- .../file-templates/templates/makefile-gmake-mode/__cpp | 2 +- modules/feature/file-templates/templates/ruby-mode/__module | 6 +++--- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 2b8cec15b..85c66c477 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -12,12 +12,6 @@ persistent-soft-flush persistent-soft-store)) (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)) (autoload sym "subr-x" nil nil 'macro)) diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index def4428dc..506d905aa 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -190,7 +190,7 @@ Courtesy of esh-mode.el" (defun +irc|init-lui-wrapping () (setq fringes-outside-margins 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))) diff --git a/modules/feature/file-templates/templates/gitignore-mode/__ b/modules/feature/file-templates/templates/gitignore-mode/__ index 372ce6795..cb95699c3 100644 --- a/modules/feature/file-templates/templates/gitignore-mode/__ +++ b/modules/feature/file-templates/templates/gitignore-mode/__ @@ -4,7 +4,7 @@ tmp/ `(let ((type-ignore (yas-choose-value '("(none)" "python" "ruby" "java" "js")))) - (s-join "\n" + (string-join (cond ((string= type-ignore "python") '("*.py[cod]" "*.egg" @@ -20,5 +20,5 @@ tmp/ '("*.class" "build")) ((string= type-ignore "js") - '("*.tern-port")) - )))` + '("*.tern-port"))) + "\n"))` diff --git a/modules/feature/file-templates/templates/makefile-gmake-mode/__cpp b/modules/feature/file-templates/templates/makefile-gmake-mode/__cpp index d5a3cb66e..d589c266e 100644 --- a/modules/feature/file-templates/templates/makefile-gmake-mode/__cpp +++ b/modules/feature/file-templates/templates/makefile-gmake-mode/__cpp @@ -13,7 +13,7 @@ RELEASE_FLAGS = -O2 -D NDEBUG -combile -fwhole-program RELEASE_DIR = ./build/release 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) SOURCES = \$(shell echo src/*.cpp) \$(shell echo src/**/*.cpp) OBJECTS = \$(SOURCES:.cpp=.o) diff --git a/modules/feature/file-templates/templates/ruby-mode/__module b/modules/feature/file-templates/templates/ruby-mode/__module index 3c5bdaeb9..44cf0da3d 100644 --- a/modules/feature/file-templates/templates/ruby-mode/__module +++ b/modules/feature/file-templates/templates/ruby-mode/__module @@ -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 \ No newline at end of file