Move machine and platform specific code into new files
Move some config out of custom.el for portability
This commit is contained in:
27
lisp/windows-nt.el
Normal file
27
lisp/windows-nt.el
Normal file
@@ -0,0 +1,27 @@
|
||||
;;; $DOOMDIR/lisp/windows-nt.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Windows path
|
||||
(when (eq system-type 'windows-nt)
|
||||
|
||||
;; https://emacs.stackexchange.com/a/29949
|
||||
;; Make sure Unix tools are in front of `exec-path`
|
||||
;; (let ((bash (executable-find "bash")))
|
||||
;; (when bash
|
||||
;; (push (file-name-directory bash) exec-path)))
|
||||
;;
|
||||
;; version of bash found is incorrect, so just use the system git path instead
|
||||
(push "C:/Program Files/Git/usr/bin/" exec-path)
|
||||
|
||||
;; Update PATH from exec-path
|
||||
(let ((path
|
||||
(mapcar
|
||||
'file-truename
|
||||
(append exec-path (split-string (getenv "PATH") path-separator t)))))
|
||||
(setenv "PATH" (mapconcat 'identity (delete-dups path) path-separator))))
|
||||
|
||||
(provide (intern (format "%s" system-type)))
|
||||
|
||||
;; For elisp-autofmt
|
||||
;; Local variables:
|
||||
;; elisp-autofmt-load-packages-local: ("use-package" "use-package-core")
|
||||
;; end:
|
||||
Reference in New Issue
Block a user