]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/sh-script.el: Test "in-string" of the right char!
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 29 Aug 2017 13:44:19 +0000 (09:44 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 29 Aug 2017 13:44:19 +0000 (09:44 -0400)
(sh-syntax-propertize-function): Fix off-by-one error.
Fixes bug#23526.

lisp/progmodes/sh-script.el

index 54c47b719fb77646f7dec125ca2f3e22ccd39443..ea2e98424ff6d00a65dd5fd2c6cc71668f5ba208 100644 (file)
@@ -1138,7 +1138,7 @@ subshells can nest."
    (syntax-propertize-rules
     (sh-here-doc-open-re
      (2 (sh-font-lock-open-heredoc
-         (match-beginning 0) (match-string 1) (match-beginning 2))))
+         (1+ (match-beginning 0)) (match-string 1) (match-beginning 2))))
     ("\\s|" (0 (prog1 nil (sh-syntax-propertize-here-doc end))))
     ;; A `#' begins a comment when it is unquoted and at the
     ;; beginning of a word.  In the shell, words are separated by