mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
feature/eval: improve REPL error handling
Emit more informative error messages depending on the problem.
This commit is contained in:
@ -24,9 +24,12 @@
|
|||||||
(if (commandp command)
|
(if (commandp command)
|
||||||
(call-interactively command)
|
(call-interactively command)
|
||||||
(funcall command))))
|
(funcall command))))
|
||||||
(unless (bufferp buffer)
|
(cond ((null buffer)
|
||||||
(error "REPL command didn't return a buffer"))
|
(error "REPL handler %S couldn't open the REPL buffer" command))
|
||||||
(with-current-buffer buffer (+eval-repl-mode +1))
|
((not (bufferp buffer))
|
||||||
|
(error "REPL handler %S failed to return a buffer" command)))
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(+eval-repl-mode +1))
|
||||||
(puthash key buffer +eval-repl-buffers)
|
(puthash key buffer +eval-repl-buffers)
|
||||||
buffer)))
|
buffer)))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
Reference in New Issue
Block a user