Skip to content

Commit 79e6894

Browse files
committed
Default to clojure.core ns for Grimoire
This is necessary for special forms, which do not have ns. Grimoire defaults to `clojure.core`.
1 parent fa7b9d8 commit 79e6894

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### New Features
66

7+
* [#2012](https://github.com/clojure-emacs/cider/pull/2007): Support special forms in `cider-apropos` and `cider-grimoire-lookup`.
78
* [#2007](https://github.com/clojure-emacs/cider/pull/2007): Fontify code blocks from `cider-grimoire` if possible.
89
* [#1990](https://github.com/clojure-emacs/cider/issues/1990): Add new customation variable `cider-save-files-on-cider-refresh` to allow auto-saving buffers when `cider-refresh` is called.
910
* Add new function `cider-load-all-files`, along with menu bar update.

cider-grimoire.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,13 @@ opposite of what that option dictates."
9191
(current-buffer)))
9292

9393
(defun cider-grimoire-lookup (symbol)
94-
"Look up the grimoire documentation for SYMBOL."
94+
"Look up the grimoire documentation for SYMBOL.
95+
96+
If SYMBOL is a special form, the clojure.core ns is used, as is
97+
Grimoire's convention."
9598
(if-let ((var-info (cider-var-info symbol)))
9699
(let ((name (nrepl-dict-get var-info "name"))
97-
(ns (nrepl-dict-get var-info "ns"))
100+
(ns (nrepl-dict-get var-info "ns" "clojure.core"))
98101
(url-request-method "GET")
99102
(url-request-extra-headers `(("Content-Type" . "text/plain"))))
100103
(url-retrieve (cider-grimoire-url name ns)

0 commit comments

Comments
 (0)