Permalink
Browse files

Add var to add extra eldoc safe commands.

This fixes a bug where nrepl-complete (or other completion mechanisms) didn't
trigger eldoc display.
  • Loading branch information...
1 parent 37fa0e3 commit 64b5e86fc63c1989ab5e1b51f864177665f1181b @metajack metajack committed Aug 23, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 nrepl.el
View
4 nrepl.el
@@ -141,6 +141,9 @@ joined together.")
(defvar nrepl-err-handler 'nrepl-default-err-handler
"Evaluation error handler")
+(defvar nrepl-extra-eldoc-commands '("nrepl-complete" "yas/expand")
+ "Extra commands to be added to eldoc's safe commands list.")
+
(defcustom nrepl-popup-stacktraces t
"Non-nil means pop-up error stacktraces.
Nil means do not, useful when in repl"
@@ -398,6 +401,7 @@ joined together.")
(defun nrepl-eldoc-enable-in-current-buffer ()
(make-local-variable 'eldoc-documentation-function)
(setq eldoc-documentation-function 'nrepl-eldoc)
+ (apply 'eldoc-add-command nrepl-extra-eldoc-commands)
(turn-on-eldoc-mode))
;;; Response handlers

0 comments on commit 64b5e86

Please sign in to comment.