From 9e36e77a282e988076a635e7e81495174548584e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 23 Aug 2014 09:04:06 -0400 Subject: Add snakemake-compile-command function --- snakemake-mode.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'snakemake-mode.el') 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)) -- cgit v1.2.3