[TxMt] Patch for Tcl Syntax

Oscar Bonilla ob at bitmover.com
Thu Sep 8 21:50:06 UTC 2005

Here's a patch that fixes a problem with syntax highlighting in Tcl.
Basically if you have

     set foo "some \[ escaped \] brackets"

all the code after the string is taken as a string.

The other problem this fixes (although I'm not sure this is the right  
fix) is with curly brackets in interpolated variables. E.g.

     puts "${variable} ${weird variable with spaces}"

the first ${variable} works, but the second ${weird variable with  
spaces} doesn't.

Although, admittedly you have to question the sanity of whomever puts  
spaces in his variables...

Index: Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist
--- Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist     (revision 1719)
+++ Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist     (working copy)
@@ -100,7 +100,7 @@
                                         <string>FIXME not sure this  
is the proper way to do Tcl escape sequences --Allan</string>
-                                       <string>\\([abfnrtv"\\]|0\d 
+                                       <string>\\([\[\]abfnrtv"\\]|0 
@@ -108,7 +108,7 @@
                                         <string>FIXME what are legal  
variable characters? --Allan</string>
-                                       <string>\$[a-zA-Z]+</string>
+                                       <string>\${?[a-zA-Z]+}?</string>

pgp fingerprint: BC64 2E7A CAEF 39E1 9544  80CA F7D5 784D FB46 16C1

More information about the textmate mailing list