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 .


Try the function slime-describe-symbol , which is usually bound to Cc Cd d.

Place the point somewhere near the function name and hit Cc, then Cd, and then d.

There's also slime-describe-function , bound to Cc Cd 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 Cc Cd Ch. 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.


我发现了slime-aproposeldoc minor模式的组合(确保你有swank-clojure 1.4.0,因为它修复了这两种模式)比上面提到的slime-describe-symbol/function命令更好。


From SLIME REPL you can run (use 'clojure.repl). This will make functions like apropos and doc available

链接地址: http://www.djcxy.com/p/38582.html

上一篇: Emacs和Clojure方法调用层次结构

下一篇: Emacs中的Clojure文档