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

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

bug#18379: 24.3.93; Bash font lock: pretty inconsistent treatment of ``


From: Stefan Monnier
Subject: bug#18379: 24.3.93; Bash font lock: pretty inconsistent treatment of `` and $()
Date: Tue, 02 Sep 2014 20:23:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> The syntax table treats ` as an string quote character, so
>
> `if [[ $x == x ]]; then echo x; else echo y fi`
> $(if [[ $x == x ]]; then echo x; else echo y fi)
>
> are highlighted in a very different way although they are semantically
> equivalent.

This is largely historical, I think (with the $(...) highlighting
appearing more recently).  I don't have a strong opinion either way, but
highlighting it differently could be construed as a feature as well
(letting the user choose between the two quoting mechanisms based on
how she likes it to be highlighted).

IOW we could change it, but the motivation to do so is not very high and
it's not "obviously better".

> Related to do above, I don't know whether the different highlighting of
> the first word in:
>
> $(if [[ $x == x ]]; then echo x; else echo y fi)
> if [[ $x == x ]]; then echo x; else echo y fi
>
> is intended or accidental, but it looks pretty weird.

I don't know either, but I agree it's weird.  Patch welcome.


        Stefan





reply via email to

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