[plt-scheme] Re: Feature request: syntax coloring of . , ,@ #, #,@

From: Derick Eddington (derick.eddington at gmail.com)
Date: Fri Jan 18 19:04:55 EST 2008

On Fri, 2007-12-28 at 03:22 -0800, Derick Eddington wrote:
> Could the reader syntaxes , ,@ #, #,@ be syntax-highlighted as the
> Constant color like ' ` #' #` are?  And could the reader pair syntax .
> be colored as the Parenthesis color?
> 
> Or maybe something's wrong on my end? (Currently 371.3-svn26oct2007,
> though those have never been colored for me in previous versions.) 

After looking at collects/syntax-color/scheme-lexer.ss, I realized all
the reader syntaxes I mentioned above are what the "Other" color is
for! :)  To make the coloring just the way I wanted it (I don't know if
this affects the semantics of how DrScheme interprets the source
code...), I made the Other color the same as Parenthesis color and made
this small change:

--- scheme-lexer.ss  2008-01-18 15:55:01.000000000 -0800
+++ scheme-lexer.ss  2008-01-18 15:52:27.000000000 -0800
@@ -286,9 +286,9 @@
       (ret lexeme 'parenthesis '|{| start-pos end-pos)]
      [(:or ")" "]" "}")
       (ret lexeme 'parenthesis (string->symbol lexeme) start-pos end-pos)]
-     [(:or "'" "`" "#'" "#`" "#&")
+     [(:or "'" "`" "#'" "#`" "," ",@" "#," "#,@" "#&")
       (ret lexeme 'constant #f start-pos end-pos)]
-     [(:or sharing reader-command "." "," ",@" "#," "#,@")
+     [(:or sharing reader-command "." )
       (ret lexeme 'other #f start-pos end-pos)]


-- 
: Derick
----------------------------------------------------------------



Posted on the users mailing list.