aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-10-04 22:40:04 -0400
committerKyle Meyer <kyle@kyleam.com>2018-10-04 22:46:55 -0400
commit7ee9518f0ac25f602319aec5011b458500b2bbfb (patch)
tree5c77b6b1a8b9db96caa4be9d9255ccd661c55f30
parent43b3315149956765b7b3480dfd095ffd00b41dc2 (diff)
downloadsnakemake-mode-7ee9518f0ac25f602319aec5011b458500b2bbfb.tar.gz
snakemake-font-lock-keywords: Increase command precedence
With the addition of 'report', the built-in names and command names are no longer disjoint sets. All occurrences of 'report' are fontified as a built-in because the built-in regexp is a substring of the command regexp. Move the command regexp before the built-in regexp so that the 'report:' command is highlighted as a command.
-rw-r--r--snakemake-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index 22b7128..b752dd9 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -437,11 +437,11 @@ embedded R, you need to set mmm-global-mode to a non-nil value such as 'maybe.")
(group field-key)
(zero-or-more space) ":")
1 font-lock-type-face)
- (,(snakemake-rx (group sm-builtin)) 1 font-lock-builtin-face)
(,(snakemake-rx line-start (zero-or-more space)
(group sm-command)
(zero-or-more space) ":")
- 1 font-lock-keyword-face)))
+ 1 font-lock-keyword-face)
+ (,(snakemake-rx (group sm-builtin)) 1 font-lock-builtin-face)))
;;;###autoload
(define-derived-mode snakemake-mode python-mode "Snakemake"