emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Font-locking and single quotes in shell script mode


From: Stefan Monnier
Subject: Re: Font-locking and single quotes in shell script mode
Date: Sat, 08 Jul 2006 08:46:36 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>       * progmodes/sh-script.el (sh-font-lock-syntactic-keywords): \ doesn't
>       escape single quotes.

> causes a bug in sh-mode when the file contains something like the
> following:

> | $ cat foo.sh
> | #!/bin/sh
> | echo Don\'t do that
> | echo "Let's do that instead"
> | $

> The single quote on the second line messes up fontification of the rest
> of the file up to the next single quote.  Reverting sh-script.el to
> revision 1.172 makes this test case work again.

Yes: one setting is right for some cases and the other is right for the
other cases.  I made the change because it seemed to be more often correct
that way.  But that depends on your usage pattern.

Feel free to fix it for good, but it's difficult.  And if you're up for such
a challenge, then maybe you're up for the next one as well:

  echo "$(echo '"')"


-- Stefan




reply via email to

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