fix(factor): repl handler

Otherwise `+eval/open-repl-*` commands will emit "REPL handler X failed
to return a buffer" errors.

Fix: #7788
Co-authored-by: steve-ayerhart <steve-ayerhart@users.noreply.github.com>
This commit is contained in:
Henrik Lissner 2024-04-05 19:01:59 -04:00 committed by Yann Esposito (Yogsototh)
parent 7d4b0d22dd
commit f4ebe1a4c4
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
2 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1,8 @@
;;; lang/factor/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +factor/open-repl ()
"Open the Factor Listener."
(interactive)
(call-interactively #'run-factor)
(current-buffer))

View file

@ -5,7 +5,10 @@
:init
(after! factor-mode
(set-eval-handler! 'factor-mode #'fuel-eval-region)
(set-repl-handler! 'factor-mode #'run-factor))
(set-repl-handler! 'factor-mode #'+factor/open-repl
:persist t
:send-region #'fuel-eval-region
:send-buffer #'fuel-run-file))
:config
(set-lookup-handlers! 'factor-mode
:definition #'fuel-edit-word-at-point