Skip to content

Commit 2c8f510

Browse files
committed
[Fix #2816] Update eldoc to work with Emacs 28.1
1 parent 2318ee3 commit 2c8f510

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* [#2839](https://github.com/clojure-emacs/cider/pull/2839): Fix symbol-at-point on var-quoted symbols.
2929
* [#2807](https://github.com/clojure-emacs/cider/pull/2807): Fix require-repl-utils for shadow-cljs repls.
3030
* [#1971](https://github.com/clojure-emacs/cider/issues/1971), [#2628](https://github.com/clojure-emacs/cider/issues/2628): Don't try to font-lock multi-chunk results in the REPL.
31+
* [#2816](https://github.com/clojure-emacs/cider/issues/2816): Update eldoc to work with Emacs 28.1.
3132

3233
## 0.24.0 (2020-02-15)
3334

cider-eldoc.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,11 @@ Only useful for interop forms. Clojure forms would be returned unchanged."
473473
(defun cider-eldoc-setup ()
474474
"Setup eldoc in the current buffer.
475475
eldoc mode has to be enabled for this to have any effect."
476-
(setq-local eldoc-documentation-function #'cider-eldoc)
476+
;; Emacs 28.1 changes the way eldoc is setup.
477+
;; There you can have multiple eldoc functions.
478+
(if (boundp 'eldoc-documentation-functions)
479+
(add-hook 'eldoc-documentation-functions #'cider-eldoc nil t)
480+
(setq-local eldoc-documentation-function #'cider-eldoc))
477481
(apply #'eldoc-add-command cider-extra-eldoc-commands))
478482

479483
(provide 'cider-eldoc)

0 commit comments

Comments
 (0)