doomemacs/core/lib/macros-quickrun.el

14 lines
468 B
EmacsLisp
Raw Normal View History

2015-06-15 15:05:52 +08:00
;;; macros-quickrun.el
;;;###autoload
2015-08-01 20:39:19 +08:00
(defmacro build-for! (mode command &optional build-file)
2015-06-15 15:05:52 +08:00
"Register major/minor MODE with build COMMAND. If FILES are provided, do an
additional check to make sure they exist in the project root."
`(add-hook! ,mode
(when (or (null ,build-file)
(narf/project-has-files ,build-file))
(setq narf--build-command '(,command . ,build-file)))))
(provide 'macros-quickrun)
;;; macros-quickrun.el ends here