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

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

bug#39277: 26.3; Tcl font lock does not understand quoting


From: Stefan Monnier
Subject: bug#39277: 26.3; Tcl font lock does not understand quoting
Date: Sat, 31 Oct 2020 09:20:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> apologies for late reply,

No need to apologize, and it's been less than 4 days, so it's definitely
not late.

> I needed a couple of days to work with the patched tcl.el in my
> (disgustingly large) tcl codebase to be sure nothing breaks & can
> confirm now.

Great, thanks!

> The original case is solved
> (although the enclosed {"string} is not font-locked as string but I
> wouldn't consider it an error)

Yes, this is a separate problem and I can't see how to fix it: since
"everything's a string" in Tcl, it's really not clear what
`font-lock-string-face` should apply to and what it shouldn't apply to.

The current design is to use it only where "..." is used.  When the code
is fully under your control it lets you choose (to some extent at least)
what is highlighted and what is not (by choosing "..." vs {...}), but
clearly it won't be "right" in all cases.

> plus it fixes the following:
>
>     proc foo4 () {
>        puts "hello}"
>     }
>
> this was marked as valid before your changes but tclsh won't accept it
> as such - the bracket } inside the string needs to be escaped when
> inside a proc context (but as a plain statement there's no such
> requirement).

Indeed.


        Stefan






reply via email to

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