Use s.el instead of subr-x string funcs
This commit is contained in:
parent
2526101de6
commit
2a377b44f1
6 changed files with 7 additions and 7 deletions
|
@ -22,11 +22,11 @@
|
|||
"Runs a shell command and prints any output to the DOOM buffer."
|
||||
(let ((cmd-list (split-string command " ")))
|
||||
(cond ((equal (car cmd-list) "sudo")
|
||||
(apply 'doom-sudo (string-join (cdr cmd-list) " ") args))
|
||||
(apply 'doom-sudo (s-join " " (cdr cmd-list)) args))
|
||||
((let ((bin (executable-find "npm")))
|
||||
(and (file-exists-p bin)
|
||||
(not (file-writable-p bin))))
|
||||
(apply 'doom-sudo (string-join cmd-list " ") args))
|
||||
(apply 'doom-sudo (s-join " " cmd-list) args))
|
||||
(t
|
||||
(princ (shell-command-to-string (apply 'format command args)))))))
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Fallback to repository root."
|
|||
(error
|
||||
(setq url (shell-command-to-string "hub browse -u --"))
|
||||
(setq url (if url
|
||||
(concat (string-trim url) "/"
|
||||
(concat (s-trim url) "/"
|
||||
(file-relative-name (buffer-file-name)
|
||||
(doom-project-root))
|
||||
(when (use-region-p)
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
(when-let (pkgs (cl-remove-if
|
||||
(lambda (pkg) (zerop (shell-command (format "pip show %s" pkg))))
|
||||
'("jedi" "setuptools")))
|
||||
(sh "pip install %s" (string-join pkgs " "))
|
||||
(sh "pip install %s" (s-join " " pkgs))
|
||||
t))
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(unless (executable-find "rustc") (push "rust" pkgs))
|
||||
(unless (executable-find "cargo") (push "cargo" pkgs))
|
||||
(when pkgs
|
||||
(sudo "pacman --noconfirm -S %s" (string-join pkgs " ")))))
|
||||
(sudo "pacman --noconfirm -S %s" (s-join " " pkgs)))))
|
||||
('debian) ;; TODO
|
||||
('macos
|
||||
(unless (executable-find "rustc")
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;;
|
||||
(def-bootstrap! sh
|
||||
(when-let (progs (cl-remove-if 'executable-find '("zshdb" "bashdb" "shellcheck")))
|
||||
(let ((prog-str (string-join progs " ")))
|
||||
(let ((prog-str (s-join " " progs)))
|
||||
(pcase (doom-system-os)
|
||||
('arch
|
||||
(sudo "pacman --noconfirm -S %s" prog-str))
|
||||
|
|
|
@ -26,7 +26,7 @@ trigger electric indentation."
|
|||
(chars (plist-get plist :chars))
|
||||
(words (plist-get plist :words)))
|
||||
(when (or chars words)
|
||||
(let ((fn-name (intern (format "doom--electric-%s" (string-join (mapcar 'symbol-name modes) "-")))))
|
||||
(let ((fn-name (intern (format "doom--electric-%s" (s-join "-" (mapcar 'symbol-name modes))))))
|
||||
`(progn
|
||||
(defun ,fn-name ()
|
||||
(electric-indent-local-mode +1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue