From 7ee9518f0ac25f602319aec5011b458500b2bbfb Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 4 Oct 2018 22:40:04 -0400 Subject: 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. --- snakemake-mode.el | 4 ++-- 1 file 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" -- cgit v1.2.3