* Font lock bug in sh-script.el
@ 2002-12-15 23:39 Richard Stallman
2002-12-16 7:53 ` Daniel Pfeiffer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Richard Stallman @ 2002-12-15 23:39 UTC (permalink / raw)
Cc: emacs-devel
This shell script
svrmgrl << EOF
CONNECT INTERNAL
STARTUP
EXIT
EOF
while
# foo
seems to confuse sh-script.el's font lock support.
All the text following the first line is treated as a here-document.
Note that all the spaces in this test case are ordinary spaces.
(Someone else reported a bug involving non-breaking spaces.)
Would you please look at this?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Font lock bug in sh-script.el
2002-12-15 23:39 Font lock bug in sh-script.el Richard Stallman
@ 2002-12-16 7:53 ` Daniel Pfeiffer
2002-12-16 14:08 ` Stefan Monnier
2002-12-16 16:56 ` Stefan Monnier
2 siblings, 0 replies; 5+ messages in thread
From: Daniel Pfeiffer @ 2002-12-16 7:53 UTC (permalink / raw)
Cc: emacs-devel
Hi Richard,
Richard Stallman <rms@gnu.org> skribis:
> This shell script
> svrmgrl << EOF
> CONNECT INTERNAL
> STARTUP
> EXIT
> EOF
>
> while
> # foo
> seems to confuse sh-script.el's font lock support.
> All the text following the first line is treated as a here-document.
That is correct! Only in the first column does EOF have it's special meaning.
> Note that all the spaces in this test case are ordinary spaces.
> (Someone else reported a bug involving non-breaking spaces.)
Yes, he sent it to me first, and I asked him to send it to the bug list, since I no longer use shell (Perl instead :-).
Anyways, those non-breaking spaces are pretty whacky. While they work in both bash and pdksh, neither documents what that EOF may look like. The bash manual calls it a word, so accepting nbsp`s here is almost a bash bug.
As long as there is no specification, all you could do is trial and error, to find the common subset of characters accepted by all shells, or differentiate for each one. In the latter case I guess you'd be fighting with differences between various commercial ksh`s...
coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer
-- GPL 3: take the wind out of Palladium's sails! --
------
-- My other stuff here too, sawfish, make.pl...: --
------
-- http://dapfy.bei.t-online.de/ --
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Font lock bug in sh-script.el
2002-12-15 23:39 Font lock bug in sh-script.el Richard Stallman
2002-12-16 7:53 ` Daniel Pfeiffer
@ 2002-12-16 14:08 ` Stefan Monnier
2002-12-16 16:56 ` Stefan Monnier
2 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2002-12-16 14:08 UTC (permalink / raw)
Cc: emacs-devel
> svrmgrl << EOF
> CONNECT INTERNAL
> STARTUP
> EXIT
> EOF
>
> while
> # foo
>
> seems to confuse sh-script.el's font lock support.
> All the text following the first line is treated as a here-document.
I have written this font-lock support, so I'll take care of it,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Font lock bug in sh-script.el
2002-12-15 23:39 Font lock bug in sh-script.el Richard Stallman
2002-12-16 7:53 ` Daniel Pfeiffer
2002-12-16 14:08 ` Stefan Monnier
@ 2002-12-16 16:56 ` Stefan Monnier
2002-12-17 18:44 ` Richard Stallman
2 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2002-12-16 16:56 UTC (permalink / raw)
Cc: emacs-devel
> This shell script
>
> svrmgrl << EOF
> CONNECT INTERNAL
> STARTUP
> EXIT
> EOF
>
> while
> # foo
>
> seems to confuse sh-script.el's font lock support.
> All the text following the first line is treated as a here-document.
As mentioned earlier, this is indeed correct.
He should use either
svrmgrl << ' EOF'
CONNECT INTERNAL
STARTUP
EXIT
EOF
while
# foo
or
svrmgrl <<- EOF
CONNECT INTERNAL
STARTUP
EXIT
EOF
while
# foo
- Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-12-17 18:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-15 23:39 Font lock bug in sh-script.el Richard Stallman
2002-12-16 7:53 ` Daniel Pfeiffer
2002-12-16 14:08 ` Stefan Monnier
2002-12-16 16:56 ` Stefan Monnier
2002-12-17 18:44 ` Richard Stallman
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).