config/default: new +default/compile command (bound to M-b)
This commit is contained in:
parent
9961df061e
commit
aeb030e391
2 changed files with 18 additions and 1 deletions
|
@ -38,3 +38,20 @@
|
|||
(defun +default/browse-snippets ()
|
||||
(interactive) (doom-project-browse emacs-snippets-dir))
|
||||
;; NOTE No need for a browse-snippets variant, use `yas-visit-snippet-file'
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/compile (arg)
|
||||
"Runs `compile' from the root of the current project.
|
||||
|
||||
If a compilation window is already open, recompile that instead.
|
||||
|
||||
If ARG (universal argument), runs `compile' from the current directory."
|
||||
(interactive "P")
|
||||
(if (and (bound-and-true-p compilation-in-progress)
|
||||
(buffer-live-p compilation-last-buffer))
|
||||
(recompile)
|
||||
(call-interactively
|
||||
(if arg
|
||||
#'projectile-compile-project
|
||||
#'compile))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue