<div dir="ltr"><div>Thanks Greg.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Geiser mode for Emacs provides both of these things.</blockquote>
<div class="gmail_extra"><br></div><div class="gmail_extra">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.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
2. The general way to go about this would be to use<br>`identifier-binding` to find the module(s) that define and provide the<br>thing, then search within the file to find the definition or provision.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>A head start:<br><a href="https://github.com/greghendershott/racket-mode/blob/master/defn.rkt" target="_blank">https://github.com/greghendershott/racket-mode/blob/master/defn.rkt</a> </blockquote><div><br></div><div>I'll look into that code of yours. </div>
<br><div class="gmail_quote">On Sun, Dec 29, 2013 at 7:32 AM, Greg Hendershott <span dir="ltr"><<a href="mailto:greghendershott@gmail.com" target="_blank">greghendershott@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Sat, Dec 28, 2013 at 2:01 PM, Scott Klarenbach <<a href="mailto:scott@pointyhat.ca">scott@pointyhat.ca</a>> wrote:<br>
</div><div class="im">> It would be really nice to print the source code of a known procedure on the<br>
> repl, in order to get a quick view of what it does.  Or, the "pa" function<br>
> which prints out the arguments of a procedure is even more useful.<br>
<br>
</div>A few ideas here:<br>
<br>
1. Geiser mode for Emacs provides both of these things.<br>
<br>
2. The general way to go about this would be to use<br>
`identifier-binding` to find the module(s) that define and provide the<br>
thing, then search within the file to find the definition or provision.<br>
<br>
A head start:<br>
<a href="https://github.com/greghendershott/racket-mode/blob/master/defn.rkt" target="_blank">https://github.com/greghendershott/racket-mode/blob/master/defn.rkt</a><br>
<br>
3. Another approach, as Neil mentioned, is to provide this capability<br>
at least for functions you define yourself.<br>
<br>
Starter using a struct with a procedure property (you could also use a<br>
side dictionary for this):<br>
<br>
<a href="http://stackoverflow.com/questions/20349543/how-do-you-return-the-description-of-a-procedure-in-scheme/20362858#20362858" target="_blank">http://stackoverflow.com/questions/20349543/how-do-you-return-the-description-of-a-procedure-in-scheme/20362858#20362858</a><br>

<br>
As Neil mentioned you could create a #lang where `define` is your<br>
special define of this sort.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Talk to you soon,<br><br>Scott Klarenbach<br><br>PointyHat Software Corp.<br><a href="http://www.pointyhat.ca" target="_blank">www.pointyhat.ca</a><br>p 604-568-4280<br>
e <a href="mailto:scott@pointyhat.ca" target="_blank">scott@pointyhat.ca</a><br><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">200-1575 W. Georgia</span><br>
Vancouver, BC <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">V6G2V3</span><br><br>_______________________________________<br>To iterate is human; to recur, divine
</div></div>