summaryrefslogtreecommitdiff
path: root/cider-doc.el
diff options
context:
space:
mode:
Diffstat (limited to 'cider-doc.el')
-rw-r--r--cider-doc.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/cider-doc.el b/cider-doc.el
index 2a517d1a..a5b21ef8 100644
--- a/cider-doc.el
+++ b/cider-doc.el
@@ -400,7 +400,17 @@ Tables are marked to be ignored by line wrap."
(when (or super ifaces)
(insert "\n"))
(when (or forms args)
- (emit (cider-font-lock-as-clojure (or forms args))))
+ (insert " ")
+ (save-excursion
+ (emit (cider-font-lock-as-clojure (substring (or forms args) 1 -1))))
+ ;; It normally doesn't happen, but it's technically conceivable for
+ ;; the args string to contain unbalanced sexps, so `ignore-errors'.
+ (ignore-errors
+ (forward-sexp 1)
+ (while (not (looking-at "$"))
+ (insert "\n")
+ (forward-sexp 1)))
+ (forward-line 1))
(when (or special macro)
(emit (if special "Special Form" "Macro") 'font-lock-variable-name-face))
(when added