summaryrefslogtreecommitdiff
path: root/cider-doc.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2016-02-11 15:10:09 +0200
committerBozhidar Batsov <bozhidar@batsov.com>2016-02-11 15:10:09 +0200
commitd82744a41b5b18836cb410a94ae773bb2fbe687b (patch)
tree42569212d247bf643176175bbeaf3a77bf3c638e /cider-doc.el
parentbe5b1fd87b6312d1758b0368730e8820102d689a (diff)
Make sure there's a connection in cider-doc and cider-javadoc
Otherwise the users would get a nasty error when they try to invoke them and there are no connections.
Diffstat (limited to 'cider-doc.el')
-rw-r--r--cider-doc.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/cider-doc.el b/cider-doc.el
index f91b1a69..e8b70ba5 100644
--- a/cider-doc.el
+++ b/cider-doc.el
@@ -193,6 +193,7 @@ Prompts for the symbol to use, or uses the symbol at point, depending on
the value of `cider-prompt-for-symbol'. With prefix arg ARG, does the
opposite of what that option dictates."
(interactive "P")
+ (cider-ensure-connected)
(funcall (cider-prompt-for-symbol-function arg)
"Javadoc for"
#'cider-javadoc-handler))
@@ -254,6 +255,7 @@ Prompts for the symbol to use, or uses the symbol at point, depending on
the value of `cider-prompt-for-symbol'. With prefix arg ARG, does the
opposite of what that option dictates."
(interactive "P")
+ (cider-ensure-connected)
(funcall (cider-prompt-for-symbol-function arg)
"Doc for"
#'cider-doc-lookup))