* how to override bad coloring in shell-script-mode?
[not found] <E19NTay-0000kN-9U@monty-python.gnu.org>
@ 2003-06-04 9:06 ` Joe Corneli
0 siblings, 0 replies; 2+ messages in thread
From: Joe Corneli @ 2003-06-04 9:06 UTC (permalink / raw)
The following is a sample from a bash script I've been working on.
grep "<<$SF>>" $HOME/.todo/$TODOLIST > $HOME/p
ade=$?
rm $HOME/p
Now that I have color in my rxvt, I'm noticing something bad: everything
after the line containing the "<<" is in sh-heredoc-face until the code
comes to another line containing "<<" and ">>". Note, however, that it is
not the _next_ line containing those strings that stops the yellow tide,
but one rather far along in the code. Then things are normal for a while,
then back to sh-heredoc-face.
This bad behaviour is not present in XEmacs, interestingly enough.
I'll submit a bug report on this shortly, but in the mean time I'd like to
know how to get Emacs to ignore everything having to do with "here docs".
Thanks,
Joe
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how to override bad coloring in shell-script-mode?
[not found] <mailman.7265.1054717678.21513.help-gnu-emacs@gnu.org>
@ 2003-06-04 16:06 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2003-06-04 16:06 UTC (permalink / raw)
> grep "<<$SF>>" $HOME/.todo/$TODOLIST > $HOME/p
It seems indeed to trigger a bug in sh-script in that it doesn't
notice that << is inside quotes (it looks like the bug appears
only if there's nothing between the " and the <<).
> This bad behaviour is not present in XEmacs, interestingly enough.
I believe XEmacs uses completely different code for that mode.
Does it do anything at all with here documents ?
> I'll submit a bug report on this shortly, but in the mean time I'd like to
> know how to get Emacs to ignore everything having to do with "here docs".
No need to file a bug report, this bug is fixed in the CVS version of Emacs.
In the mean time, you might be able to fix the bug instead, with:
(defadvice sh-font-lock-heredoc (before bug-fix activate)
(setq start (1+ start)))
If you prefer to turn it all off try something like:
(add-hook 'sh-mode-hook
(lambda ()
;; Disable buggy heredoc matching in Emacs-21.[123].
(defun sh-font-lock-heredoc (&rest r) nil)))
-- Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-04 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.7265.1054717678.21513.help-gnu-emacs@gnu.org>
2003-06-04 16:06 ` how to override bad coloring in shell-script-mode? Stefan Monnier
[not found] <E19NTay-0000kN-9U@monty-python.gnu.org>
2003-06-04 9:06 ` Joe Corneli
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).