[racket] quack-view-keyword-docs for Racket

From: Darshan Shaligram (scintilla at gmail.com)
Date: Sat Feb 5 04:45:27 EST 2011

I've been learning Racket using Emacs with quack. Unfortunately
quack-view-keyword-docs doesn't seem to work with Racket docs (perhaps
this is already fixed in a new version of quack? I'm using quack
0.40), so I thought fellow quack+racket users might be interested in
this workaround (elisp):

(defun my-racket-view-keyword-docs (keyword)
  (interactive (list (quack-prompt-for-keyword "View docs for keyword")))
  (comint-send-string (scheme-proc) (format "(help %s)\n" keyword)))

(fset 'quack-view-keyword-docs 'my-racket-view-keyword-docs)

i.e. change quack-view-keyword-docs to fire off a (help <keyword>)
form to the inferior Racket, which opens the relevant documentation.

I'm newish to Emacs and very new to Racket, so let me know if there's
a better way to accomplish this.

Cheers,
Darshan


Posted on the users mailing list.