aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-06-28 19:20:51 -0400
committerKyle Meyer <kyle@kyleam.com>2014-06-28 19:20:51 -0400
commit0071aa6b85b5a932d42f268f3db75ce1afc342b5 (patch)
tree10144897a1160eef69b3125a64e759dfbb28f7e4
parent2f2f9a94042b9b7a0ca5c58c89a7c40649e8bf26 (diff)
downloadsnakemake-mode-0071aa6b85b5a932d42f268f3db75ce1afc342b5.tar.gz
Make compile command flags customizable
-rw-r--r--snakemake-mode.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index dff3651..5ededc9 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -66,6 +66,11 @@
:type 'integer
:group 'snakemake)
+(defcustom snakemake-compile-command-options nil
+ "Flags to add to default Snakemake compilation command."
+ :group 'snakemake
+ :type '(repeat string))
+
;;; Regexp
@@ -214,7 +219,9 @@ indentation is determined by the location within the rule block.
"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) "snakemake"))
+ (set (make-local-variable 'compile-command)
+ (mapconcat 'identity
+ (cons "snakemake" snakemake-compile-command-options) " ")))
;;;###autoload
(add-to-list 'auto-mode-alist '("Snakefile" . snakemake-mode))