aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--snakemake-mode.el14
1 files changed, 7 insertions, 7 deletions
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))
@@ -217,6 +210,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
(add-to-list 'auto-mode-alist '("\\.smrules" . snakemake-mode))