From: Lars Ingebrigtsen <larsi@gnus.org>
To: Daniel Hornung <daniel.hornung@ds.mpg.de>
Cc: 20777@debbugs.gnu.org
Subject: bug#20777: 24.4; sh-mode: fill-paragraph does not recognize EOF
Date: Thu, 27 May 2021 01:38:44 +0200 [thread overview]
Message-ID: <87wnrl5am3.fsf@gnus.org> (raw)
In-Reply-To: <12154011.SxuHhXH5n9@tiersen> (Daniel Hornung's message of "Tue, 9 Jun 2015 14:14:02 +0200")
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
next prev parent reply other threads:[~2021-05-26 23:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 12:14 bug#20777: 24.4; sh-mode: fill-paragraph does not recognize EOF Daniel Hornung
2021-05-26 23:38 ` Lars Ingebrigtsen [this message]
2022-05-08 12:14 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnrl5am3.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=20777@debbugs.gnu.org \
--cc=daniel.hornung@ds.mpg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).