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


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: mvar <mvar.40k <at> gmail.com>
Cc: 39277 <at> debbugs.gnu.org, Hadrien Lacour <hadrien.lacour <at> posteo.net>
Subject: bug#39277: 26.3; Tcl font lock does not understand quoting
Date: Tue, 27 Oct 2020 09:51:17 +0100
On Okt 26 2020, mvar wrote:

> diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
> index 33aad2d39f..5dd02c1367 100644
> --- a/lisp/progmodes/tcl.el
> +++ b/lisp/progmodes/tcl.el
> @@ -410,7 +410,8 @@ tcl-font-lock-keywords
>  (defconst tcl-syntax-propertize-function
>    (syntax-propertize-rules
>     ;; Mark the few `#' that are not comment-markers.
> -   ("[^;[{ \t\n][ \t]*\\(#\\)" (1 ".")))
> +   ("[^;[{ \t\n][ \t]*\\(#\\)" (1 "."))
> +   ((concat "\\_<" (regexp-opt tcl-builtin-list t) "\\_>" "\s*{\\([^}].*\\)}") (2 "_")))
>    "Syntactic keywords for `tcl-mode'.")
>  
>  ;; FIXME need some way to recognize variables because array refs look
> @@ -506,6 +507,7 @@ tcl-set-font-lock-keywords
>           ;; number of "namespace::" qualifiers.  A leading "::" refers
>           ;; to the global namespace.
>           '("\\${\\([^}]+\\)}" 1 font-lock-variable-name-face)
> +         '("{\\([^}]+\\)}" 1 font-lock-string-face)

That mishandles nested or quoted braces.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




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.