aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-04-30 15:23:01 +0000
committerGerd Moellmann2001-04-30 15:23:01 +0000
commit3c05ee140aa01f957639b6cbd7300c7fbe9ca42a (patch)
tree6d0303383b12bdde19d005ce528ab8aafe66e242
parent38d56be353507d0b9aebbe63d5fb7f9a17b4b593 (diff)
downloademacs-3c05ee140aa01f957639b6cbd7300c7fbe9ca42a.tar.gz
emacs-3c05ee140aa01f957639b6cbd7300c7fbe9ca42a.zip
(sh-font-lock-heredoc): Allow
optional backslash at the start of the here-document delimiter. (sh-font-lock-syntactic-keywords): Likewise.
-rw-r--r--lisp/progmodes/sh-script.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 21a717c3863..358b1fd22a5 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -829,7 +829,7 @@ See `sh-feature'.")
829 "\\(\n\\)"))) 829 "\\(\n\\)")))
830 (unless (assoc ere font-lock-syntactic-keywords) 830 (unless (assoc ere font-lock-syntactic-keywords)
831 (let* ( ;; A rough regexp that should find us back. 831 (let* ( ;; A rough regexp that should find us back.
832 (sre (concat "<<\\(-\\)?\\s-*['\"]?" 832 (sre (concat "<<\\(-\\)?\\s-*\\\\?['\"]?"
833 (regexp-quote string) "['\"]?[ \t\n]")) 833 (regexp-quote string) "['\"]?[ \t\n]"))
834 (code `(cond 834 (code `(cond
835 ((save-excursion (re-search-backward ,sre nil t)) 835 ((save-excursion (re-search-backward ,sre nil t))
@@ -875,7 +875,7 @@ See `sh-feature'.")
875 ;; of the shell command language (under `quoting') but with `$' removed. 875 ;; of the shell command language (under `quoting') but with `$' removed.
876 `(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 ,sh-st-symbol) 876 `(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 ,sh-st-symbol)
877 ;; Find HEREDOC starters and add a corresponding rule for the ender. 877 ;; Find HEREDOC starters and add a corresponding rule for the ender.
878 ("[^<>]<<\\(-\\)?\\s-*\\(\\(['\"][^'\"]+['\"]\\|\\sw\\|\\s_\\)+\\).*\\(\n\\)" 878 ("[^<>]<<\\(-\\)?\\s-*\\\\?\\(\\(['\"][^'\"]+['\"]\\|\\sw\\|\\s_\\)+\\).*\\(\n\\)"
879 4 (sh-font-lock-heredoc 879 4 (sh-font-lock-heredoc
880 (match-beginning 0) (match-string 2) (match-end 1))) 880 (match-beginning 0) (match-string 2) (match-end 1)))
881 ;; Distinguish the special close-paren in `case'. 881 ;; Distinguish the special close-paren in `case'.