From: Lars Ingebrigtsen Date: Wed, 30 Oct 2019 14:39:15 +0000 (+0100) Subject: font-lock \ #foo in shell mode more correctly X-Git-Tag: emacs-27.0.90~818 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b996117fe5d561d86665c23f7012871e345a6e77;p=emacs.git font-lock \ #foo in shell mode more correctly * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): \ #foo isn't a comment -- it's a symbol that starts with a space character (bug#17538). --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8177329f32b..62e4e5c49e0 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1141,7 +1141,7 @@ subshells can nest." ;; metacharacters. The list of special chars is taken from ;; the single-unix spec of the shell command language (under ;; `quoting') but with `$' removed. - ("\\(?:[^|&;<>(`\\\"' \t\n]\\|\\${\\)\\(#+\\)" (1 "_")) + ("\\(?:[^|&;<>(`\\\"' \t\n]\\|\\${\\|\\ \\)\\(#+\\)" (1 "_")) ;; In addition, `#' at the beginning of closed parentheses ;; does not start a comment if the parentheses are not isolated ;; by metacharacters, excluding [()].