aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-10-11 21:36:32 +0200
committerLars Ingebrigtsen2019-10-11 21:36:38 +0200
commit8e4a090ff71f64b1d36aebc3f6a8e0145f690bf9 (patch)
tree3520455c2bed75839318a36135904bab8a147324
parent255c892b486eeb507b4533141fec9218b7a67b2f (diff)
downloademacs-8e4a090ff71f64b1d36aebc3f6a8e0145f690bf9.tar.gz
emacs-8e4a090ff71f64b1d36aebc3f6a8e0145f690bf9.zip
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.
-rw-r--r--lisp/progmodes/sh-script.el2
1 files changed, 1 insertions, 1 deletions
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'."
4356 (or arg (sh--maybe-here-document))) 4356 (or arg (sh--maybe-here-document)))
4357 4357
4358(defun sh--maybe-here-document () 4358(defun sh--maybe-here-document ()
4359 (or (not (looking-back "[^<]<<" (line-beginning-position))) 4359 (or (not (looking-back "[^<]<< " (line-beginning-position)))
4360 (save-excursion 4360 (save-excursion
4361 (backward-char 2) 4361 (backward-char 2)
4362 (or (sh-quoted-p) 4362 (or (sh-quoted-p)