Changeset 9582


Ignore:
Timestamp:
May 22, 2008, 11:47:10 PM (11 years ago)
Author:
gz
Message:

Add *show-restarts-on-break*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-1/l1-readloop-lds.lisp

    r9357 r9582  
    545545(defvar *break-frame* nil "frame-pointer arg to break-loop")
    546546(defvar *break-loop-when-uninterruptable* t)
     547(defvar *show-restarts-on-break* #+ccl-0711 t #-ccl-0711 nil)
    547548
    548549(defvar *error-reentry-count* 0)
     
    591592           (*backtrace-contexts* (cons context *backtrace-contexts*)))
    592593      (with-toplevel-commands :break
    593         (if *continuablep*
    594           (let* ((*print-circle* *error-print-circle*)
    595                  (*print-level* *backtrace-print-level*)
    596                  (*print-length* *backtrace-print-length*)
     594        (if *show-restarts-on-break*
     595          (let ((*print-circle* *error-print-circle*)
     596                (*print-level* *backtrace-print-level*)
     597                (*print-length* *backtrace-print-length*)
    597598                                        ;(*print-pretty* nil)
    598                  (*print-array* nil))
    599             (format t "~&> Type :GO to continue, :POP to abort, :R for a list of available restarts.")
    600             (format t "~&> If continued: ~A~%" continue))
    601           (format t "~&> Type :POP to abort, :R for a list of available restarts.~%"))
     599                (*print-array* nil))
     600            (format t "~&> Type :POP to abort, or :C <n> to invoke one of the following restarts:")
     601            (let* ((r (apply #'vector (compute-restarts *break-condition*))))
     602              (dotimes (i (length r) (terpri))
     603                (format t "~&~d. ~a" i (svref r i)))))
     604          (if *continuablep*
     605            (let* ((*print-circle* *error-print-circle*)
     606                   (*print-level* *backtrace-print-level*)
     607                   (*print-length* *backtrace-print-length*)
     608                                        ;(*print-pretty* nil)
     609                   (*print-array* nil))
     610              (format t "~&> Type :GO to continue, :POP to abort, :R for a list of available restarts.")
     611              (format t "~&> If continued: ~A~%" continue))
     612            (format t "~&> Type :POP to abort, :R for a list of available restarts.~%")))
    602613        (format t "~&> Type :? for other options.")
    603614        (terpri)
Note: See TracChangeset for help on using the changeset viewer.