From 988ae683dd460b153efc8ead533121d8d7195452 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Oct 2017 23:55:48 +0200 Subject: [PATCH] lang/sh: improve variable highlighting in quotes --- modules/lang/sh/autoload.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/sh/autoload.el b/modules/lang/sh/autoload.el index e1baafc77..ad78ecc4b 100644 --- a/modules/lang/sh/autoload.el +++ b/modules/lang/sh/autoload.el @@ -8,7 +8,7 @@ (while (and (setq res (re-search-forward - "\\(\\$\\)\\({.+?}\\|\\<.+?\\>\\)" + "[^\\]\\(\\$\\)\\({.+?}\\|\\<[a-zA-Z0-9_]+\\|[@*#!]\\)" limit t)) (not (eq (nth 3 (syntax-ppss)) ?\")))) res))) @@ -20,7 +20,7 @@ (let (res) (while (and (setq res - (re-search-forward "\\(\\$(.+?)\\|`.+?`\\)" + (re-search-forward "[^\\]\\(\\$(.+?)\\|`.+?`\\)" limit t)) (not (eq (nth 3 (syntax-ppss)) ?\")))) res)))