Permalink
Browse files

autoconfigure eldoc for slime, but don't enable eldoc minor mode

  • Loading branch information...
1 parent d60b5b8 commit 2cac27097ca24699bfc6e7ad3fd4bed2feb1308b @tavisrudd tavisrudd committed Jan 27, 2012
Showing with 16 additions and 2 deletions.
  1. +4 −2 resources/swank_elisp_payloads.clj
  2. +12 −0 src/swank/payload/slime-eldoc.el
@@ -1,2 +1,4 @@
-["swank/payload/slime.el" "swank/payload/slime-repl.el"
- "swank/payload/slime-frame-colors.el"]
+["swank/payload/slime.el"
+ "swank/payload/slime-repl.el"
+ "swank/payload/slime-frame-colors.el"
+ "swank/payload/slime-eldoc.el"]
@@ -0,0 +1,12 @@
+(require 'eldoc)
+(defun clojure-slime-eldoc-message ()
+ (when (and (featurep 'slime)
+ (slime-background-activities-enabled-p))
+ (slime-echo-arglist) ; async, return nil for now
+ nil))
+
+(defun clojure-localize-documentation-function ()
+ (set (make-local-variable 'eldoc-documentation-function)
+ 'clojure-slime-eldoc-message))
+
+(add-hook 'slime-mode-hook 'clojure-localize-documentation-function)

0 comments on commit 2cac270

Please sign in to comment.