[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c9d550a: Fontize $(...) slightly better in bash mode

From: Lars Ingebrigtsen
Subject: master c9d550a: Fontize $(...) slightly better in bash mode
Date: Wed, 5 Aug 2020 05:35:09 -0400 (EDT)

branch: master
commit c9d550a301d3a5e62b3296804ccf42efc69d0796
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fontize $(...) slightly better in bash mode
    * lisp/progmodes/sh-script.el (sh-font-lock-keywords-var): Fontize
    $(...) slightly better (bug#42417).  Instead of just fontizing the
    first word in the expression, fontize until the closing
    parenthesis.  This doesn't work well if you have nested $(...)
 lisp/progmodes/sh-script.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 044d782..5a47594 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -838,7 +838,7 @@ See `sh-feature'.")
     (rc sh-append es)
-    (bash sh-append sh ("\\$(\\(\\sw+\\)" (1 'sh-quoted-exec t) ))
+    (bash sh-append sh ("\\$(\\([^)\n]+\\)" (1 'sh-quoted-exec t) ))
     (sh sh-append shell
        ;; Variable names.
        ("\\$\\({#?\\)?\\([[:alpha:]_][[:alnum:]_]*\\|[-#?@!]\\)" 2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]