make #:keywords have different color prefs in DrRacket

closes PR 13492
This commit is contained in:
Robby Findler 2013-02-05 12:29:57 -06:00
parent 014abe64c0
commit 12ebfa2cf4
6 changed files with 9 additions and 3 deletions

View File

@ -297,6 +297,7 @@
(comment ,(make-object color% 194 116 31) ,(string-constant scheme-mode-color-comment))
(string ,constant-green ,(string-constant scheme-mode-color-string))
(constant ,constant-green ,(string-constant scheme-mode-color-constant))
(hash-colon-keyword ,(make-object color% "brown") ,(string-constant scheme-mode-color-hash-colon-keyword))
(parenthesis ,(make-object color% "brown") ,(string-constant scheme-mode-color-parenthesis))
(error ,(make-object color% "red") ,(string-constant scheme-mode-color-error))
(other ,(make-object color% "black") ,(string-constant scheme-mode-color-other)))))
@ -309,6 +310,7 @@
(comment ,(make-object color% 249 148 40))
(string ,(make-object color% 51 174 51))
(constant ,(make-object color% 60 194 57))
(hash-colon-keyword ,(make-object color% 151 69 43))
(parenthesis ,(make-object color% 151 69 43))
(other ,(make-object color% "white")))])
(map

View File

@ -183,7 +183,7 @@
(let ([scribble-style
(case style
[(symbol) symbol-color]
[(parenthesis) paren-color]
[(parenthesis hash-colon-keyword) paren-color]
[(constant string) value-color]
[(comment) comment-color]
[else default-color])])

View File

@ -330,6 +330,7 @@ please adhere to these guidelines:
(scheme-mode-color-string "String")
(scheme-mode-color-constant "Constant")
(scheme-mode-color-parenthesis "Parenthesis")
(scheme-mode-color-hash-colon-keyword "#:Keyword")
(scheme-mode-color-error "Error")
(scheme-mode-color-other "Other")
;; the ~a is filled in with one of the above (scheme-mode-*)

View File

@ -315,7 +315,7 @@
(make-num digit10 (:? radix10))
(make-num digit16 radix16))
(ret lexeme 'constant #f start-pos end-pos 'datum)]
[keyword (ret lexeme 'parenthesis #f start-pos end-pos 'datum)]
[keyword (ret lexeme 'hash-colon-keyword #f start-pos end-pos 'datum)]
[str (ret lexeme 'string #f start-pos end-pos 'datum)]
[";"
(values (apply string (read-line/skip-over-specials input-port)) 'comment #f

View File

@ -54,7 +54,7 @@ The @racket[racket-lexer] function returns 5 values:
This may change in the future to other string or non-string data.}
@item{A symbol in @racket['(error comment sexp-comment
white-space constant string no-color parenthesis other symbol eof)].}
white-space constant string no-color parenthesis hash-colon-keyword symbol eof other)].}
@item{A symbol in @racket['(|(| |)| |[| |]| |{| |}|)] or @racket[#f].}

View File

@ -6,6 +6,9 @@ racket/date: changed current-date to provide nanoseconds,
added date*->seconds
racket/gui/base: changed menu-bar% get-frame method to
return 'root for root menu bar
syntax-color/racket-lexer: added 'hash-colon-keyword
(which also affects syntax-color/scheme-lexer,
syntax-color/module-lexer, and syntax-color/scribble-lexer)
Version 5.3.2.2
Added file-truncate