<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On Jun 8, 2013, at 1:31 PM, Robby Findler <<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>> wrote:</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">It is the ones that it has special indentation rules for. Not super heplful to you here, I know. </div></blockquote><div><br></div><div>That sounds like this won't be super easy, but it's a start! Thank you Robby.</div><div><br></div><div><div>Who knows how to add indentation rules to DrRacket? Where are they found? Is their modification something that can be attempted by a long-time programmer, but Racket novice? If I can add an indentation rule for "if" that just duplicates the current default behavior, then hopefully, it would highlight my ifs!</div><div><br></div></div><blockquote type="cite"><div dir="ltr">The specific conditional that you might be looking (if you wish to do things differently) for is in framework/private/racket.rkt around line 1306 in the body of racket-lexer-wrapper. The first case of that 'cond' is the keyword case and that shows how it wires into the preferences. So if you wanted to add a new preference pane or something, that's where you'd look at its values.</div></blockquote><div><br></div><div>I don't really want to add a new preference pane to DrRacket; that sounds like a useful and worthy project for someone with more time and experience than I have. I just want to get DrRacket to highlight "if" to start out with.</div><div><br></div><div>Any other knowledgable people willing to share some insights to help in this quest?</div><div><br></div><div>--Christopher</div><br><blockquote type="cite"><div dir="ltr"><div><br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 8, 2013 at 2:05 PM, Christopher <span dir="ltr"><<a href="mailto:ultimatemacfanatic@gmail.com" target="_blank">ultimatemacfanatic@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:monospace">Greetings all! First post here.<br><br>Just finished my first significant project in Racket: writing parser in Racket for my new Python/Racket fusion programming language (roughly 2000 lines of Racket for the parser). The next phase is the runtime classes, which seems less straightforward--wish me luck! <br>
<br>Also happy to report figuring out on my own how to get Command-L reassigned to goto-line instead of Choose Language in DrRacket, using my own home-brewed keybindings file, as I frequently switch between other editors that use this key binding. (However, DrRacket not only fails when instructed through the menu interface to detach this keybindings file, but does so reporting an internal error, but that's another story and may or may not be due to somebody else's bug.)<br>
<br><br><br><br>Now that I've introduced myself, let me get to the reason I'm writing.<br><br>In DrRacket I have gone to Preferences menu item->Colors tab->Racket sub-tab and changed the color associated with "Keyword" to orange, to make it a different color from the blue color for "Symbol".<br>
<br>I have noticed that there are some symbols colored as being in the "Keyword" category that I wish were not, and there are others not so colored that I wish would be thus. For instance, I'm considered having "match", "class", and "make-object" be colored as "Symbol" instead of "Keyword"; on the other hand, I am dumbfounded that, while "cond", "while", and "unless" are colored as keywords, "if" is colored as an ordinary symbol; this seems like an incontestable error of omission (surely an accident).<br>
<br>I have grepped through all the source files in DrRacket's "collects" folder, but have not been able to isolate the place where DrRacket's list of keywords are stored.<br><br>Does anyone know how to tweak the list of symbols that DrRacket colors as keywords? I would consider using a different, more easily customizable editor like my beloved TextMate 2, but neither it nor any of the other editors I'm familiar with has DrRacket's intelligent indentation assistance that conforms to Racket conventions for indenting--this is a feature without which I would probably lose my mind, given my compulsion for proper and consistent indentation.<br>
<br><br><br>Any help would be appreciated!<br><br>Thank you,<br><br>Christopher</div></div><br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></body></html>