summaryrefslogtreecommitdiff
path: root/cider-doc.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2016-05-20 13:17:03 -0700
committerBozhidar Batsov <bozhidar@batsov.com>2016-05-20 13:21:06 -0700
commit80a18e042b23290f8400d14397e5f71f99f2ca6d (patch)
tree36469eb1887f3c30648fa755a5a47e9d1770537b /cider-doc.el
parent4d7a77e14d39907f15e753c429200ec6c3f4d9ac (diff)
Improve a bit the way we display the definition location in docview
buffers I've taken a page from Elisp itself.
Diffstat (limited to 'cider-doc.el')
-rw-r--r--cider-doc.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/cider-doc.el b/cider-doc.el
index 5d3b234f..28d40870 100644
--- a/cider-doc.el
+++ b/cider-doc.el
@@ -444,10 +444,15 @@ Tables are marked to be ignored by line wrap."
(browse-url (button-get x 'url))))
(insert ".\n"))
(insert "\n")
- (insert-text-button "[source]"
- 'follow-link t
- 'action (lambda (_x)
- (cider-docview-source)))
+ (if cider-docview-file
+ (progn
+ (insert (propertize (if class java-name clj-name) 'font-lock-face 'font-lock-function-name-face) " is defined in ")
+ (insert-text-button cider-docview-file
+ 'follow-link t
+ 'action (lambda (_x)
+ (cider-docview-source)))
+ (insert "."))
+ (insert "No definition location information available."))
(when see-also
(insert "\n\n Also see: ")
(mapc (lambda (ns-sym)