From 9961df061e107ed8f2b3f244d97df745f16c2538 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 14 Mar 2018 19:44:57 -0400 Subject: [PATCH] config/default: :compile => :make; improve :make doom:make now performs file modifier substitution, e.g. %:p:h. --- modules/config/default/+evil-commands.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/config/default/+evil-commands.el b/modules/config/default/+evil-commands.el index 979620c44..9290fcbc2 100644 --- a/modules/config/default/+evil-commands.el +++ b/modules/config/default/+evil-commands.el @@ -17,9 +17,10 @@ (kill-new default-directory) (message "Copied to clipboard"))) -(evil-define-command doom:compile (command &optional bang) - (interactive "") - (let ((default-directory (if bang (doom-project-root t) default-directory))) +(evil-define-command doom:make (command &optional from-pwd) + (interactive "") + (let ((default-directory (if from-pwd default-directory (doom-project-root t))) + (command (and command (evil-ex-replace-special-filenames command)))) (compile command))) @@ -95,7 +96,7 @@ (ex! "sw[oop]" #'+helm:swoop) (ex! "todo" #'+helm:todo))) ;; Project tools -(ex! "compile" #'doom:compile) +(ex! "mak[e]" #'doom:make) (ex! "debug" #'+debug/run) (ex! "er[rors]" #'flycheck-list-errors) ;; File operations