From 43d84704c62c1def935013b6c3adcb97ddf1bf5e Mon Sep 17 00:00:00 2001 From: Spencer Florence Date: Mon, 18 Aug 2014 23:56:43 -0500 Subject: [PATCH] Slight change to how drracket handles lexer/colorers, and doc changes to color:text<%> original commit: dc4398235a4cdef97a14dce9f2342721486e3bbc --- pkgs/gui-pkgs/gui-doc/scribblings/framework/color.scrbl | 7 +++++-- pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/gui-pkgs/gui-doc/scribblings/framework/color.scrbl b/pkgs/gui-pkgs/gui-doc/scribblings/framework/color.scrbl index 5347b123..cb8fa4ef 100644 --- a/pkgs/gui-pkgs/gui-doc/scribblings/framework/color.scrbl +++ b/pkgs/gui-pkgs/gui-doc/scribblings/framework/color.scrbl @@ -37,8 +37,11 @@ @racket[get-token] returns the next token as 5 values: @itemize[ - @item{An unused value. This value is intended to represent the textual - component of the token and may be used as such in the future.} + @item{This value is intended to represent the textual + component of the token. If the second value returned by + @racket[get-token] is @racket['symbol] and this value is a string + then the value is used to differentiate between symbols and keywords + for the purpose of coloring and formatting, configurable from DrRacket's preference's editing menu.} @item{A symbol describing the type of the token. This symbol is transformed into a style-name via the @racket[token-sym->style] argument. The symbols @racket['white-space] and @racket['comment] have special diff --git a/pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt b/pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt index 5698a034..c34c80c7 100644 --- a/pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt +++ b/pkgs/gui-pkgs/gui-lib/framework/private/racket.rkt @@ -1320,6 +1320,7 @@ (module-lexer/waived in offset mode)) (cond [(and (eq? type 'symbol) + (string? lexeme) (get-keyword-type lexeme tabify-pref)) (values lexeme 'keyword paren start end backup-delta new-mode)] [else