From 6af48198df6520acbba6c0408ab7ff697ef348f4 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 17 Nov 2016 18:13:42 -0500 Subject: 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. --- snakemake-mode.el | 3 +-- 1 file changed, 1 insertion(+), 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) ":") -- cgit v1.2.3