Commit 3c05ee14 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(sh-font-lock-heredoc): Allow

optional backslash at the start of the here-document delimiter.
(sh-font-lock-syntactic-keywords): Likewise.
parent 38d56be3
......@@ -829,7 +829,7 @@ See `sh-feature'.")
(unless (assoc ere font-lock-syntactic-keywords)
(let* ( ;; A rough regexp that should find us back.
(sre (concat "<<\\(-\\)?\\s-*['\"]?"
(sre (concat "<<\\(-\\)?\\s-*\\\\?['\"]?"
(regexp-quote string) "['\"]?[ \t\n]"))
(code `(cond
((save-excursion (re-search-backward ,sre nil t))
......@@ -875,7 +875,7 @@ See `sh-feature'.")
;; of the shell command language (under `quoting') but with `$' removed.
`(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 ,sh-st-symbol)
;; Find HEREDOC starters and add a corresponding rule for the ender.
4 (sh-font-lock-heredoc
(match-beginning 0) (match-string 2) (match-end 1)))
;; Distinguish the special close-paren in `case'.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment