diff options
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-autodoc.el | 17 | ||||
-rw-r--r-- | elisp/geiser.el | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el index 54669a1..674e0dd 100644 --- a/elisp/geiser-autodoc.el +++ b/elisp/geiser-autodoc.el @@ -193,10 +193,10 @@ when `geiser-autodoc-display-module-p' is on." (defsubst geiser-autodoc--autodoc-at-point (callback) (geiser-autodoc--autodoc (geiser-syntax--scan-sexps) callback)) -(defun geiser-autodoc--eldoc-function (callback) +(defun geiser-autodoc--eldoc-function (&optional callback) (ignore-errors (when (not (geiser-autodoc--inhibit)) - (geiser-autodoc--autodoc-at-point callback)))) + (geiser-autodoc--autodoc-at-point (or callback 'eldoc-message))))) (defun geiser-autodoc-show () "Show the signature or value of the symbol at point in the echo area." @@ -221,11 +221,14 @@ displayed in the minibuffer." :lighter geiser-autodoc-mode-string :group 'geiser-autodoc - (if geiser-autodoc-mode - (add-hook 'eldoc-documentation-functions - #'geiser-autodoc--eldoc-function nil t) - (remove-hook 'eldoc-documentation-functions - #'geiser-autodoc--eldoc-function t)) + (if (boundp 'eldoc-documentation-functions) + (if geiser-autodoc-mode + (add-hook 'eldoc-documentation-functions + #'geiser-autodoc--eldoc-function nil t) + (remove-hook 'eldoc-documentation-functions + #'geiser-autodoc--eldoc-function t)) + (set (make-local-variable 'eldoc-documentation-function) + (when geiser-autodoc-mode 'geiser-autodoc--eldoc-function))) (set (make-local-variable 'eldoc-minor-mode-string) nil) (set (make-local-variable 'eldoc-idle-delay) geiser-autodoc-delay) (eldoc-mode (if geiser-autodoc-mode 1 -1)) diff --git a/elisp/geiser.el b/elisp/geiser.el index e89f3d3..7fad7d0 100644 --- a/elisp/geiser.el +++ b/elisp/geiser.el @@ -11,7 +11,7 @@ ;; Maintainer: Jose Antonio Ortega Ruiz (jao@gnu.org) ;; Keywords: languages, scheme, geiser ;; Homepage: https://gitlab.com/emacs-geiser/ -;; Package-Requires: ((emacs "25.1") (eldoc "1.11") (transient "0.3") (project "0.8.1")) +;; Package-Requires: ((emacs "25.1") (transient "0.3") (project "0.8.1")) ;; SPDX-License-Identifier: BSD-3-Clause ;; Version: 0.23.2 |