From: Lars Ingebrigtsen Date: Fri, 11 Oct 2019 19:36:32 +0000 (+0200) Subject: Make << shell heredoc expansion less enthusiastic X-Git-Tag: emacs-27.0.90~1146 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e4a090ff71f64b1d36aebc3f6a8e0145f690bf9;p=emacs.git Make << shell heredoc expansion less enthusiastic * lisp/progmodes/sh-script.el (sh--maybe-here-document): Require a space before expanding a heredoc (bug#3226). This allows the user to insert a bash <<< "herestring", which was previously difficult. --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index cbc0ac74f09..2046080c42f 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -4356,7 +4356,7 @@ The document is bounded by `sh-here-document-word'." (or arg (sh--maybe-here-document))) (defun sh--maybe-here-document () - (or (not (looking-back "[^<]<<" (line-beginning-position))) + (or (not (looking-back "[^<]<< " (line-beginning-position))) (save-excursion (backward-char 2) (or (sh-quoted-p)