From 2f2f9a94042b9b7a0ca5c58c89a7c40649e8bf26 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 28 Jun 2014 15:56:00 -0400 Subject: Reorder mode definition This avoids free variable warning about `snakemake-font-lock-keywords' when compiling. --- snakemake-mode.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'snakemake-mode.el') diff --git a/snakemake-mode.el b/snakemake-mode.el index bdbb298..dff3651 100644 --- a/snakemake-mode.el +++ b/snakemake-mode.el @@ -194,13 +194,6 @@ indentation is determined by the location within the rule block. ;;; Mode -;;;###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) "snakemake")) - (defvar snakemake-font-lock-keywords `((,snakemake-rule-line-re (1 font-lock-keyword-face) (2 font-lock-function-name-face)) @@ -216,6 +209,13 @@ indentation is determined by the location within the rule block. (add-hook 'snakemake-mode-hook 'snakemake-set-imenu-generic-expression) +;;;###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) "snakemake")) + ;;;###autoload (add-to-list 'auto-mode-alist '("Snakefile" . snakemake-mode)) ;;;###autoload -- cgit v1.2.3