Thanks Greg.
> Geiser mode for Emacs provides both of these things. I use Geiser mode but find it pretty lacking for this purpose. Some of the time it provides documentation, but a lot of the time it doesn't provide anything. It may be that I have to upgrade my version or look into the configuration options. 2. The general way to go about this would be to use > `identifier-binding` to find the module(s) that define and provide the > thing, then search within the file to find the definition or provision. > A head start: > https://github.com/greghendershott/racket-mode/blob/master/defn.rkt I'll look into that code of yours. On Sun, Dec 29, 2013 at 7:32 AM, Greg Hendershott <greghendersh...@gmail.com > wrote: > On Sat, Dec 28, 2013 at 2:01 PM, Scott Klarenbach <sc...@pointyhat.ca> > wrote: > > It would be really nice to print the source code of a known procedure on > the > > repl, in order to get a quick view of what it does. Or, the "pa" > function > > which prints out the arguments of a procedure is even more useful. > > A few ideas here: > > 1. Geiser mode for Emacs provides both of these things. > > 2. The general way to go about this would be to use > `identifier-binding` to find the module(s) that define and provide the > thing, then search within the file to find the definition or provision. > > A head start: > https://github.com/greghendershott/racket-mode/blob/master/defn.rkt > > 3. Another approach, as Neil mentioned, is to provide this capability > at least for functions you define yourself. > > Starter using a struct with a procedure property (you could also use a > side dictionary for this): > > > http://stackoverflow.com/questions/20349543/how-do-you-return-the-description-of-a-procedure-in-scheme/20362858#20362858 > > As Neil mentioned you could create a #lang where `define` is your > special define of this sort. > -- Talk to you soon, Scott Klarenbach PointyHat Software Corp. www.pointyhat.ca p 604-568-4280 e sc...@pointyhat.ca 200-1575 W. Georgia Vancouver, BC V6G2V3 _______________________________________ To iterate is human; to recur, divine
____________________ Racket Users list: http://lists.racket-lang.org/users