doomemacs/core/defuns/macros-quickrun.el

18 lines
573 B
EmacsLisp
Raw Normal View History

2015-06-15 15:05:52 +08:00
;;; macros-quickrun.el
;;;###autoload
(defmacro def-builder! (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)))))
2015-12-09 14:54:30 +08:00
;;;###autoload
(defmacro def-repl! (mode command)
2015-12-09 15:21:44 +08:00
`(push '(,mode . ,command) rtog/mode-repl-alist))
2015-12-09 14:54:30 +08:00
2015-06-15 15:05:52 +08:00
(provide 'macros-quickrun)
;;; macros-quickrun.el ends here