summaryrefslogtreecommitdiff
path: root/cider-apropos.el
diff options
context:
space:
mode:
authorTianxiang Xiong <tianxiang.xiong@gmail.com>2017-06-16 01:32:47 -0700
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2017-06-17 09:23:11 +0300
commit3d6b97b271b44374bbd4a52ace5e1ff9387f55cf (patch)
treee8f8e8cc31adf7efb01088617d1e871360766872 /cider-apropos.el
parent238c60c6320e78d46591fee8b947e25fd855818b (diff)
Support special forms for apropos and Grimoire
Add `apropos-special-form` button type Default to `clojure.core` ns for Grimoire; this is necessary for special forms, which do not have ns. Grimoire defaults to `clojure.core`.
Diffstat (limited to 'cider-apropos.el')
-rw-r--r--cider-apropos.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/cider-apropos.el b/cider-apropos.el
index 74d00860..bd8f8d9c 100644
--- a/cider-apropos.el
+++ b/cider-apropos.el
@@ -54,6 +54,15 @@ the symbol found by the apropos search as argument."
:group 'cider
:package-version '(cider . "0.13.0"))
+(define-button-type 'apropos-special-form
+ 'apropos-label "Special form"
+ 'apropos-short-label "s"
+ 'face 'apropos-misc-button
+ 'help-echo "mouse-2, RET: Display more help on this special form"
+ 'follow-link t
+ 'action (lambda (button)
+ (describe-function (button-get button 'apropos-symbol))))
+
(defun cider-apropos-doc (button)
"Display documentation for the symbol represented at BUTTON."
(cider-doc-lookup (button-get button 'apropos-symbol)))