From 114afeb56856626897126c17010664de07529fcc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 16 Feb 2016 07:23:47 -0500 Subject: [PATCH] build-cmd: add support for function symbols --- core/defuns/defuns-quickrun.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/defuns/defuns-quickrun.el b/core/defuns/defuns-quickrun.el index c2e0536b7..ddfb8cbc3 100644 --- a/core/defuns/defuns-quickrun.el +++ b/core/defuns/defuns-quickrun.el @@ -22,8 +22,10 @@ If ARG is nil this function calls `recompile', otherwise it calls (let ((build-file (cdr narf--build-command)) (build-cmd (car narf--build-command))) (if (or (null build-file) (narf/project-has-files build-file)) - (compile (format "cd '%s' && %s" (narf/project-root) (format build-cmd (or arg "")))) - (error "Could not find Makefile")))) + (if (symbolp build-cmd) + (call-interactively build-cmd) + (compile (format "cd '%s' && %s" (narf/project-root) (format build-cmd (or arg ""))))) + (error "Could not build!")))) ;;;; Code running ;;;;;;;;;;;;;;;;;;;;;; ;;;###autoload (autoload 'narf:eval-buffer "defuns-quickrun" nil t)