GNU bug report logs - #39277
26.3; Tcl font lock does not understand quoting

Previous Next

Package: emacs;

Reported by: Hadrien Lacour <hadrien.lacour <at> posteo.net>

Date: Sat, 25 Jan 2020 10:01:02 UTC

Severity: normal

Tags: fixed

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #65 received at 39277-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: mvar <mvar.40k <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 39277-done <at> debbugs.gnu.org,
 Hadrien Lacour <hadrien.lacour <at> posteo.net>
Subject: Re: bug#39277: 26.3; Tcl font lock does not understand quoting
Date: Sat, 31 Oct 2020 09:20:12 -0400
> 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





This bug report was last modified 4 years and 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.