[movitz-cvs] CVS update: movitz/losp/lib/repl.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Thu Feb 24 12:21:32 UTC 2005


Update of /project/movitz/cvsroot/movitz/losp/lib
In directory common-lisp.net:/tmp/cvs-serv9149

Modified Files:
	repl.lisp 
Log Message:
Have the REPL interpret integers as restart to be invoked.

Date: Thu Feb 24 13:21:31 2005
Author: ffjeld

Index: movitz/losp/lib/repl.lisp
diff -u movitz/losp/lib/repl.lisp:1.13 movitz/losp/lib/repl.lisp:1.14
--- movitz/losp/lib/repl.lisp:1.13	Sat Sep 25 17:25:53 2004
+++ movitz/losp/lib/repl.lisp	Thu Feb 24 13:21:30 2005
@@ -1,6 +1,6 @@
 ;;;;------------------------------------------------------------------
 ;;;; 
-;;;;    Copyright (C) 2001, 2003-2004, 
+;;;;    Copyright (C) 2001, 2003-2005, 
 ;;;;    Department of Computer Science, University of Tromso, Norway.
 ;;;; 
 ;;;;    For distribution policy, see the accompanying file COPYING.
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Wed Mar 19 14:58:12 2003
 ;;;;                
-;;;; $Id: repl.lisp,v 1.13 2004/09/25 15:25:53 ffjeld Exp $
+;;;; $Id: repl.lisp,v 1.14 2005/02/24 12:21:30 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -82,20 +82,26 @@
 					      nil
 					    (copy-list results)))
 		     (values-list results)))
-	      (if (not (keywordp form))
+	      (let ((restart (and (integerp form)
+				  (muerte:find-restart-by-index form
+								muerte:*debugger-dynamic-context*))))
+		(cond
+		 (restart
+		  (invoke-restart-interactively restart))
+		 ((not (keywordp form))
 		  (multiple-value-call #'process-expresion
-		    form previous-package t (eval form))
-		(multiple-value-call #'process-expresion
-		  form previous-package nil
-		  (apply 'muerte.toplevel:invoke-toplevel-command
-			 form
-			 (loop for arg = (multiple-value-bind (arg x)
-					     (simple-read-from-string buffer-string nil '#0=#:eof
-								      :start buffer-pointer)
-					   (setq buffer-pointer x)
-					   arg)
-			     until (eq arg '#0#)
-			     collect arg))))))))
+		    form previous-package t (eval form)))
+		 (t (multiple-value-call #'process-expresion
+		      form previous-package nil
+		      (apply 'muerte.toplevel:invoke-toplevel-command
+			     form
+			     (loop for arg = (multiple-value-bind (arg x)
+						 (simple-read-from-string buffer-string nil '#0=#:eof
+									  :start buffer-pointer)
+					       (setq buffer-pointer x)
+					       arg)
+				 until (eq arg '#0#)
+				 collect arg))))))))))
     (muerte.readline::readline-break (c)
       (declare (ignore c))
       (values))))




More information about the Movitz-cvs mailing list