From: Stefan Monnier Date: Tue, 29 Aug 2017 13:44:19 +0000 (-0400) Subject: * lisp/progmodes/sh-script.el: Test "in-string" of the right char! X-Git-Tag: emacs-26.0.90~319 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=01832ec21f1a880366f7d957e84b0d9c4d75b182;p=emacs.git * lisp/progmodes/sh-script.el: Test "in-string" of the right char! (sh-syntax-propertize-function): Fix off-by-one error. Fixes bug#23526. --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 54c47b719fb..ea2e98424ff 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -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