summaryrefslogtreecommitdiff
path: root/snakemake-mode.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-04-15 12:42:22 -0400
committerKyle Meyer <kyle@kyleam.com>2016-04-15 12:42:22 -0400
commit66f0d242fa063277713e723d83d051402ff12e1d (patch)
tree245e4e3da1a7ed7a2e7a2f8dd6055cdd9c769741 /snakemake-mode.el
parent90faba359fe4263c365f33c32e00131a7cf61d53 (diff)
downloadsnakemake-mode-66f0d242fa063277713e723d83d051402ff12e1d.tar.gz
mode: Unset indent-region-function
Don't use python-indent-region for indent-region-function. At first glance, setting indent-region-function to nil (that is, running indent-according-to-mode on each line) seems to indent rule blocks fine, though it will probably fail on more complex "run" values. However, this does mean that python-indent-region is no longer used when indent-region is called with a region that doesn't include a rule block, so it's probably worth adding a snakemake-indent-region function that calls python-indent-region in this case. Re: #8
Diffstat (limited to 'snakemake-mode.el')
-rw-r--r--snakemake-mode.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index dc9fbf8..319a0d8 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -338,6 +338,7 @@ label."
(set (make-local-variable 'imenu-create-index-function)
#'snakemake-imenu-create-index)
(set (make-local-variable 'indent-line-function) 'snakemake-indent-line)
+ (set (make-local-variable 'indent-region-function) nil)
(set (make-local-variable 'font-lock-defaults)
`(,(append snakemake-font-lock-keywords python-font-lock-keywords))))