summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-08-23 09:04:06 -0400
committerKyle Meyer <kyle@kyleam.com>2014-08-23 09:04:06 -0400
commit9e36e77a282e988076a635e7e81495174548584e (patch)
tree34b096725330ee789a1ab13a5bb657a401b99709
parent39505f5686aaf0738e87bad3c6da54e306afbabe (diff)
downloadsnakemake-mode-9e36e77a282e988076a635e7e81495174548584e.tar.gz
Add snakemake-compile-command function
-rw-r--r--snakemake-mode.el11
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))