[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20777: 24.4; sh-mode: fill-paragraph does not recognize EOF
From: |
Lars Ingebrigtsen |
Subject: |
bug#20777: 24.4; sh-mode: fill-paragraph does not recognize EOF |
Date: |
Thu, 27 May 2021 01:38:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Daniel Hornung <daniel.hornung@ds.mpg.de> writes:
> In sh-mode, upon typing "<<", bracketing pairs of "EOF" are created
> automatically in order to allow creation of a here document.
> Unfortunately the fill-paragraph command, when used inside the correctly
> syntax-highlighted here file region, will not take the trailing "EOF"
> into account as a delimiter, but takes this and the following lines to
> be ordinary text, thus garbling the content of the shell script.
(I'm going through old bug reports that unfortunately got no response at
the time.)
Test case:
echo <<EOF
# foo bar
EOF
`M-q' on the # line, and you get:
echo <<EOF
# foo bar EOF
Which is certainly odd, but...
echo foo
echo foo
echo foo
M-q on that and you get
echo foo echo foo echo foo
That is, it's not clear that `M-q' in shell mode is that well defined,
and what it does in EOF sections isn't inconsistent with what it does
elsewhere...
Anybody got an opinion?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#20777: 24.4; sh-mode: fill-paragraph does not recognize EOF,
Lars Ingebrigtsen <=