[racket-users] Re: [scribble] code:hilite for binders

2020-08-23 Thread Ryan Kramer
You might also be able to use make-element-id-transformer like this #lang scribble/manual @(begin (require scribble/racket scribble/eval

Re: [racket-users] [scribble] code:hilite for binders

2020-08-23 Thread Éric Tanter
I was expecting (fearing?) such an answer ;-) If by any chance you have that macro lying around, I would happily reuse it. It might make sense to include such a facility in scribble anyway. -- Éric > On 23-08-2020, at 10:27, Robby Findler wrote: > >  > I think I've run into this too (but my m

[racket-users] Re: [racket-dev] Does the Guide need to mention syntax parse & does the Style guide need to provide guidance?

2020-08-23 Thread Sorawee Porncharoenwase
The guide seems to be for the Racket code base (https://github.com/racket) rather than general Racket code, so I don't think it should say "prefer syntax-parse over syntax-case". I do think there should be a style guide for general Racket code (which could very well be based on the style guide for

[racket-users] Does the Guide need to mention syntax parse & does the Style guide need to provide guidance?

2020-08-23 Thread Stephen De Gabrielle
Hi With reference to this discussion on reddit/r/racket : https://www.reddit.com/r/Racket/comments/ie8rlf/when_creating_macros_is_syntaxparse_preferred_to/?utm_source=share&utm_medium=ios_app&utm_name=iossmf Does https://github.com/racket/racket/blob/master/pkgs/racket-doc/scribblings/guide/mac

Re: [racket-users] [scribble] code:hilite for binders

2020-08-23 Thread Robby Findler
I think I've run into this too (but my memory is foggy) and what I did was have a macro that expands into `code` and also expands into the actual code but walks over the code and drops things like code:hilite and code:comment. Robby On Sun, Aug 23, 2020 at 9:23 AM Éric Tanter wrote: > Ok, I “s

Re: [racket-users] [scribble] code:hilite for binders

2020-08-23 Thread Éric Tanter
Ok, I “solved” my problem. The `(define (code:hilite v) v)` is a hack to be able to use `code:hilite` in blocks that are executed, not just displayed, but of course that does not work when highlighting binders. The solution is to separate the display from the execution, with a separate evaluat