This patch adds "(si:top-level)" to the end of
"top-fun" of FriCAS built with ECL.

So that when typing ")fin" we are returned to ECL
REPL instead of loop.

This is similar to CCL,
https://github.com/fricas/fricas/blob/5a7a56aab971354823c20eace6d532396dd8a176/src/lisp/fricas-lisp.lisp#L133

I also updated documentation and FAQ.

I also improved the back-quoting in *fricas-initial-lisp-forms*.

- Qian

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ae1d6fe1-fe0c-4e3e-931f-4cba942e802f%40gmail.com.
diff --git a/src/doc/sphinx/source/faq.rst b/src/doc/sphinx/source/faq.rst
index 0ba7eccf..64ec9327 100644
--- a/src/doc/sphinx/source/faq.rst
+++ b/src/doc/sphinx/source/faq.rst
@@ -610,7 +610,6 @@ and now you are talking only to lisp at a lisp command prompt in
 the BOOT package. To restart FriCAS type
 ::
 
-   BOOT>(restart)
+   BOOT> (|runspad|)
 
-Note: ')fin' does not work when using Clozure CL or ECL.  Due to
-this do not use it in portable scripts.
+Note: for ECL you need to type ``(in-package "BOOT")`` before ``(|runspad|)``.
diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot
index 9ef9320e..81cddac4 100644
--- a/src/interp/int-top.boot
+++ b/src/interp/int-top.boot
@@ -50,7 +50,7 @@ are doing a lot of debugging. Commands can also be executed in the
 underlying common lisp by using the [[)lisp]] command.
 
 If the user typed [[)fin]] then we exit the loop and drop into the
-underlying common lisp. You can use the "(|fricas_restart|)" function call
+underlying common lisp. You can use the "(BOOT::|runspad|)" function call
 to return to the top level loop.
 
 If the input line starts with a close parenthesis we parse the
diff --git a/src/interp/util.lisp b/src/interp/util.lisp
index faced223..6e2f399f 100644
--- a/src/interp/util.lisp
+++ b/src/interp/util.lisp
@@ -114,11 +114,12 @@ After this function is called the image is clean and can be saved.
               (if (boundp el)
                   (push (list 'defparameter el (symbol-value el))
                         initforms)))
-          (push `(interpsys-ecl-image-init) initforms)
-          (push `(|fricas_restart|) initforms)
-          (setf initforms (reverse initforms))
-          (push `progn initforms)
-          (setf FRICAS-LISP::*fricas-initial-lisp-forms* initforms)
+          (setf FRICAS-LISP::*fricas-initial-lisp-forms*
+                `(progn
+                   ,@initforms
+                   (interpsys-ecl-image-init)
+                   (|fricas_restart|)
+                   (si:top-level)))
       )
   )
 )

Reply via email to