diff options
author | Tianxiang Xiong <tianxiang.xiong@gmail.com> | 2017-06-18 04:09:49 -0700 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2017-07-01 08:42:33 +0200 |
commit | d4841ce7c6ba315e8f2f5a4f48fcfb5a773d7d59 (patch) | |
tree | 874607cca026a7b25f9566b2dea26c411848f0e3 | |
parent | be019aa9ecdf8e04dab6a11ca518cb5e40e14689 (diff) |
Indicate both special form and macro in doc
Some symbols, like `clojure.core/let`, are both special forms AND
macros. `cider-doc` should indicate this.
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | cider-doc.el | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 93793bdb..796714ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ ### New Features -* [#2012](https://github.com/clojure-emacs/cider/pull/2007): Support special forms in `cider-apropos` and `cider-grimoire-lookup`. +* [#2015](https://github.com/clojure-emacs/cider/pull/2015): Show symbols as special forms *and* macros in `cider-doc` +* [#2012](https://github.com/clojure-emacs/cider/pull/2012): Support special forms in `cider-apropos` and `cider-grimoire-lookup`. * [#2007](https://github.com/clojure-emacs/cider/pull/2007): Fontify code blocks from `cider-grimoire` if possible. * [#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. * Add new function `cider-load-all-files`, along with menu bar update. diff --git a/cider-doc.el b/cider-doc.el index 2b34444c..55c663d1 100644 --- a/cider-doc.el +++ b/cider-doc.el @@ -432,8 +432,10 @@ Tables are marked to be ignored by line wrap." (dolist (form forms) (insert " ") (emit (cider-font-lock-as-clojure form)))) - (when (or special macro) - (emit (if special "Special Form" "Macro") 'font-lock-variable-name-face)) + (when special + (emit "Special Form" 'font-lock-keyword-face)) + (when macro + (emit "Macro" 'font-lock-variable-name-face)) (when added (emit (concat "Added in " added) 'font-lock-comment-face)) (when depr |