;;; -*- Mode: Common-Lisp; Package: User; Base: 10.; Patch-File: T -*-
;;; Written 06/15/89 16:11:37 by MCCREARY,
;;; Reason: Fixed the functions CONTINUE, USE-VALUE and STORE-VALUE
;;; so that if the restarts are not active NIL is returned.
;;; Also fixed MUFFLE-WARNING so that a CONTROL-ERROR is
;;; signaled if the restart is not active. 
;;; while running on Jules-Verne from band LOD9
;;; With SYSTEM 6.5, VIRTUAL-MEMORY 6.1, EH 6.2, MAKE-SYSTEM 6.0, MICRONET 6.0, LOCAL-FILE 6.0,
;;;  BASIC-PATHNAME 6.0, NETWORK-SUPPORT-COLD 6.0, BASIC-NAMESPACE 6.0, NETWORK-NAMESPACE 6.0,
;;;  DISK-IO 6.0, DISK-LABEL 6.0, BASIC-FILE 6.2, MAC-PATHNAME 6.0, NETWORK-PATHNAME 6.0,
;;;  COMPILER 6.2, TV 6.8, DATALINK 6.0, CHAOSNET 6.0, GC 6.2, MEMORY-AUX 6.0, NVRAM 6.0,
;;;  SYSLOG 6.0, STREAMER-TAPE 6.2, UCL 6.0, INPUT-EDITOR 6.0, METER 6.0, ZWEI 6.2,
;;;  DEBUG-TOOLS 6.0, NETWORK-SUPPORT 6.0, NETWORK-SERVICE 6.0, DATALINK-DISPLAYS 6.0,
;;;  FONT-EDITOR 6.1, SERIAL 6.0, PRINTER 6.1, MAC-PRINTER-TYPES 6.1, PRINTER-TYPES 6.0,
;;;  IMAGEN 6.0, SUGGESTIONS 6.0, MAIL-DAEMON 6.2, MAIL-READER 6.0, TELNET 6.0, VT100 6.0,
;;;  NAMESPACE-EDITOR 6.0, PROFILE 6.1, VISIDOC 6.2, TI-CLOS 6.5, CLEH 6.3, IP 3.46,
;;;  Experimental BUG 11.8, Experimental CLX 6.1, CLUE 6.5, X11M 6.1,  microcode 429,
;;;  Band Name: Release 6.0 + SLE 6/5

#!C
; From file CL-RESTARTS.LISP#> CLEH; MR-X:
#10R CONDITIONS#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "CONDITIONS"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* SYS:COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* SYS::*COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: CLEH; CL-RESTARTS.#"


(DEFUN continue ()
  "  The CONTINUE function transfers control to the restart named
CONTINUE.  If no such restart exists, CONTINUE returns NIL.  The
CONTINUE restart is a general purpose restart which provides a single
and obvious way to continue.  This restart is set up in CERROR.
"
  ;; 06/15/89 clm - Fixed so that if restart doesn't exist, NIL is returned.
  (let ((restart (find-restart 'continue)))
    (if restart 
      (invoke-restart restart)
      nil)))
))

#!C
; From file CL-RESTARTS.LISP#> CLEH; MR-X:
#10R CONDITIONS#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "CONDITIONS"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* SYS:COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* SYS::*COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: CLEH; CL-RESTARTS.#"


(DEFUN muffle-warning ()
  "  The MUFFLE-WARNING function transfers control to the restart named
MUFFLE-WARNING.  If no such restart exists, MUFFLE-WARNING signals an
error of type CONTROL-ERROR.  The MUFFLE-WARNING restart is set up by
WARN so that handlers of warning conditions can cancel the warning
message.
"
  ;; 06/15/89 clm - Fixed so that if restart doesn't exist, a CONTROL-ERROR
  ;;                is signaled
  (let ((restart (find-restart 'muffle-warning)))
    (if restart
	(invoke-restart restart)
	(error 'control-error
	       :format-string "Restart ~S is not active."
	       :format-args (list 'muffle-warning)))))
))

#!C
; From file CL-RESTARTS.LISP#> CLEH; MR-X:
#10R CONDITIONS#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "CONDITIONS"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* SYS:COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* SYS::*COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: CLEH; CL-RESTARTS.#"


(DEFUN store-value (value)
  "  The STORE-VALUE function transfers control (and one value) to the
restart named STORE-VALUE.  If no such restart exists, STORE-VALUE
returns NIL.  The STORE-VALUE restart is used by handlers trying to
recover from errors of types such as CELL-ERROR or TYPE-ERROR, where the
handler may wish to supply a replacement datum to be stored permanently.
"
  ;; 06/15/89 clm - Fixed so that if restart doesn't exist, NIL is returned.
  (let ((restart (find-restart 'store-value)))
    (if restart
	(invoke-restart restart value)
	nil)))
))

#!C
; From file CL-RESTARTS.LISP#> CLEH; MR-X:
#10R CONDITIONS#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "CONDITIONS"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* SYS:COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* SYS::*COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: CLEH; CL-RESTARTS.#"


(DEFUN use-value (value)
  "  The USE-VALUE function transfers control (and one value) to the
restart named USE-VALUE.  If no such restart exists, USE-VALUE returns
NIL.  The USE-VALUE restart is generally used by handlers trying to
recover from errors of types such as CELL-ERROR, where the handler may
wish to supply a replacement datum for one-time use.
"
  ;; 06/15/89 clm - Fixed so that if restart doesn't exist, NIL is returned.
  (let ((restart (find-restart 'use-value)))
    (if restart
	(invoke-restart restart value)
	nil)))
))
