From a4533dc45ddeebbd9afa24c86f31e6f6b4773450 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Thu, 22 Mar 2018 17:46:57 +0000 Subject: [PATCH] project-path has been added to project DSL --- lib/projects/dsl.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/projects/dsl.el b/lib/projects/dsl.el index 526c00c..d1503f9 100644 --- a/lib/projects/dsl.el +++ b/lib/projects/dsl.el @@ -5,13 +5,13 @@ "This hashmap is responsible for storing project configurations.") ;; DSL ----------------------------------------------------- -(defmacro deftask (name body) +(defmacro deftask (name &rest body) "Create a new task for the project with the given NAME and BODY." `(let ((pmap (gethash __project-name__ open-project-configurations (make-hash-table :test 'equal)))) - (puthash ,(symbol-name name) (lambda (buffer) ,body) pmap) + (puthash ,(symbol-name name) (lambda (project-path buffer) ,@body) pmap) (puthash __project-name__ pmap open-project-configurations))) (defmacro run-shell-command (command) @@ -34,7 +34,7 @@ (let* ((project-hash (gethash project open-project-configurations)) (task (gethash task-name project-hash)) (buf (with-buffer project task-name))) - (funcall task buf))) + (funcall task project buf))) (defun execute-run-task () "Execute the :run task for the current project."