summaryrefslogtreecommitdiff
path: root/snakemake-mode.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-11-17 18:13:42 -0500
committerKyle Meyer <kyle@kyleam.com>2016-11-17 18:14:15 -0500
commit6af48198df6520acbba6c0408ab7ff697ef348f4 (patch)
tree86a4cc42c6121239e810ecf40aa287654cd536d8 /snakemake-mode.el
parentb4be5e8072478a9c916add695acdbf6e8ea4fe45 (diff)
downloadsnakemake-mode-6af48198df6520acbba6c0408ab7ff697ef348f4.tar.gz
snakemake-font-lock-keywords: Increase field key precedence
Instead of distinguishing built-ins from field keys by a trailing "(", make the field key regexp, which is more specific, have a higher precedence. This allows Snakemake built-ins to be highlighted correctly even if they are not called as functions.
Diffstat (limited to 'snakemake-mode.el')
-rw-r--r--snakemake-mode.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index 448a4af..b8b1f49 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -416,12 +416,11 @@ embedded R, you need to set mmm-global-mode to a non-nil value such as 'maybe.")
(1 font-lock-keyword-face nil 'lax)
(2 font-lock-function-name-face nil 'lax)
(3 font-lock-keyword-face nil 'lax))
- (,(snakemake-rx (group sm-builtin) (zero-or-more space) "(")
- 1 font-lock-builtin-face)
(,(snakemake-rx line-start (one-or-more space)
(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) ":")