help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to override bad coloring in shell-script-mode?


From: Stefan Monnier
Subject: Re: how to override bad coloring in shell-script-mode?
Date: 04 Jun 2003 12:06:17 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>   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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]