ob-scheme: Use new `geiser' function when available

* lisp/ob-scheme.el (geiser): Add new declare.
(org-babel-scheme-get-repl): When possible, call the newer `geiser'
instead of the obsolete `run-geiser'.
This commit is contained in:
Ihor Radchenko 2022-10-31 11:56:01 +08:00
parent bd68ece99c
commit 2ab762e93b
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,7 @@
(defvar geiser-repl-window-allow-split) ; Defined in geiser-repl.el
(declare-function run-geiser "ext:geiser-repl" (impl))
(declare-function geiser "ext:geiser-repl" (impl))
(declare-function geiser-mode "ext:geiser-mode" ())
(declare-function geiser-eval-region "ext:geiser-mode"
(start end &optional and-go raw nomsg))
@ -120,7 +121,10 @@
(let ((buffer (org-babel-scheme-get-session-buffer name)))
(or buffer
(progn
(run-geiser impl)
(if (fboundp 'geiser)
(geiser impl)
;; Obsolete since Geiser 0.26.
(run-geiser impl))
(when name
(rename-buffer name t)
(org-babel-scheme-set-session-buffer name (current-buffer)))