diff --git a/bin/doom.cmd b/bin/doom.cmd index 810f3fb06..132691e4b 100644 --- a/bin/doom.cmd +++ b/bin/doom.cmd @@ -1,13 +1,24 @@ :: Forward the ./doom script to Emacs @ECHO OFF +SETLOCAL ENABLEDELAYEDEXPANSION + PUSHD "%~dp0" >NUL -IF %1=="run" ( - SHIFT - emacs -Q %* -l init.el -f "doom|run-all-startup-hooks" +SET args= +SET command=%1 + +:LOOP +SHIFT /1 +IF NOT [%1]==[] ( + SET args=%args% %1 + GOTO :LOOP +) + +IF [%command%]==[run] ( + start runemacs -Q %args% -l ..\init.el -f "doom|run-all-startup-hooks" ) ELSE ( - emacs --quick --script ./doom -- %* + emacs --quick --script .\doom -- %* ) POPD >NUL diff --git a/init.el b/init.el index 0b3b905e0..07e42f0a2 100644 --- a/init.el +++ b/init.el @@ -27,7 +27,7 @@ ;; ;;; License: MIT -(unless (boundp 'early-init-file) +(unless (bound-and-true-p early-init-file) (load (concat (file-name-directory load-file-name) "early-init") nil t))