Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clojure documentation in Emacs

Is it possible to view Clojure function documentation in Emacs? Namely, can I configure Emacs to lookup Clojure functions under the cursor?

I'm using clojure-mode and SLIME. Oddly, I can't even use apropos or dir in SLIME's repl, although they're automatically loaded by lein repl.

like image 805
Natan Yellin Avatar asked Jan 01 '12 23:01

Natan Yellin


1 Answers

Try the function slime-describe-symbol, which is usually bound to C-c C-d d.

Place the point somewhere near the function name and hit C-c, then C-d, and then d.

There's also slime-describe-function, bound to C-c C-d f, but I rarely use it, as it's less general than the aforementioned symbol-related lookup function.

To see all the documentation-related functions, press C-c C-d C-h. These bindings are not specific to Clojure; they are instead defined by SLIME, and will work as well if not better for other Lisp dialects.

like image 148
seh Avatar answered Sep 20 '22 00:09

seh