diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-08-23 09:04:06 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-08-23 09:04:06 -0400 |
commit | 9e36e77a282e988076a635e7e81495174548584e (patch) | |
tree | 34b096725330ee789a1ab13a5bb657a401b99709 /snakemake-mode.el | |
parent | 39505f5686aaf0738e87bad3c6da54e306afbabe (diff) | |
download | snakemake-mode-9e36e77a282e988076a635e7e81495174548584e.tar.gz |
Add snakemake-compile-command function
Diffstat (limited to 'snakemake-mode.el')
-rw-r--r-- | snakemake-mode.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el index 79a12f5..ca96570 100644 --- a/snakemake-mode.el +++ b/snakemake-mode.el @@ -235,14 +235,19 @@ column of the first non-blank character." (add-hook 'snakemake-mode-hook 'snakemake-set-imenu-generic-expression) +(defun snakemake-compile-command () + "Return Snakemake compile command. +Flags are taken from `snakemake-compile-command-options'." + (mapconcat 'identity + (cons "snakemake" snakemake-compile-command-options) + " ")) + ;;;###autoload (define-derived-mode snakemake-mode python-mode "Snakemake" "Mode for editing Snakemake files." (set (make-local-variable 'indent-line-function) 'snakemake-indent-line) (font-lock-add-keywords nil snakemake-font-lock-keywords) - (set (make-local-variable 'compile-command) - (mapconcat 'identity - (cons "snakemake" snakemake-compile-command-options) " "))) + (set (make-local-variable 'compile-command) (snakemake-compile-command))) ;;;###autoload (add-to-list 'auto-mode-alist '("Snakefile\\'" . snakemake-mode)) |