Add a function to quit the main loop
This commit is contained in:
parent
282ebf2f44
commit
4a7ecc072c
1 changed files with 6 additions and 1 deletions
|
|
@ -6,7 +6,8 @@
|
|||
(in-package :cl-user)
|
||||
(defpackage stoe
|
||||
(:use :cl
|
||||
:utils))
|
||||
:utils)
|
||||
(:export :main :quit))
|
||||
(in-package :stoe)
|
||||
|
||||
(defun main-loop (&optional unprotected)
|
||||
|
|
@ -21,6 +22,10 @@ continue unless `unprotected' is t."
|
|||
(eval-repl)
|
||||
(sleep 0.01))))))
|
||||
|
||||
(defun quit ()
|
||||
"Quit the main loop."
|
||||
(throw 'exit-main-loop nil))
|
||||
|
||||
(defun main (&optional argv)
|
||||
"Run the program."
|
||||
(modules:initialize argv)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue