IMO, the truly Racket-y way would be to attach a syntax property to the 
exported identifier that has information about how it should be indented. This 
is actually a major improvement over the current way DrRacket handles 
indentation because it would handle forms by their syntactic binding rather 
than by datums. That means that:

  1. Multiple forms could have the same “name” and have different indentation.
  2. Forms imported with rename-in, prefix-in, etc. would be indented properly.
  3. Indentation settings come from the forms themselves rather than some
     unrelated configuration settings.

I think all of those things are big wins over datum-based configuration. 
However, the obvious problem is that it means bindings need to be resolved 
before indentation settings can be retrieved since the binding needs to be 
resolved to access its syntax properties.

In DrRacket, I wonder if this could work similarly to the recent improvement to 
blueboxes: IIUC, they work by binding now, but they perform some 
caching/guessing so that documentation can still be resolved before background 
expansion finishes. Leveraging the same technique would probably work for 
indentation information.

Alexis

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to