;;; -*- Mode:Lisp; Readtable:CL; Package:USER; Base:10; Patch-File:T -*- ;;; Patch file for System version 125.15 ;;; Reason: ;;; LOAD-PATCH-FILE used to very strictly enforce the restriction that ;;; "The use of LOAD in a patch file is not supported." This was done by ;;; binding the function LOAD to an error routine. Unfortunately, this had ;;; a horrible side-effect: if you warm-booted in the middle of this error, ;;; the new "temporary" function value of LOAD became permanent. ;;; ;;; Now, LOAD itself checks the value of FS:THIS-IS-A-PATCH-FILE and issues ;;; a continuable, not fatal, error. You can proceed if you dare. I ;;; believe this is correct; sometimes a patch may need to LOAD something ;;; like a font file. ;;; Written 21-Jul-88 18:54:32 by keith (Keith Corbett) at site Gigamos Cambridge ;;; while running on Breaking Glass from band 1 ;;; with System 125.14, ZWEI 125.2, ZMail 73.0, Local-File 75.0, File-Server 24.0, Unix-Interface 13.0, Tape 24.0, Lambda-Diag 17.0, Experimental Window-Maker 2.1, Experimental Kermit 36.5, Experimental KMC-SYSTEM 2.0, microcode 1761, SDU Boot Tape 3.14, SDU ROM 103, 7/19. ; From modified file DJ: L.IO.FILE; OPEN.LISP#208 at 21-Jul-88 18:57:34 #8R FILE-SYSTEM#: #!:ZL (COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "FILE-SYSTEM"))) (COMPILER::PATCH-SOURCE-FILE "SYS: IO; FILE; OPEN  " (DEFUN LOAD (FILE &REST KEY-OR-POSITIONAL-ARGS) "Load the specified text file or QFASL file or input stream. If the specified filename has no type field, we try QFASL and then LISP and then INIT. Regardless of the filename type, we can tell QFASL files from text files. PACKAGE specifies the package to load into; if missing or NIL, the package specified by the file's attribute list is used. VERBOSE non-NIL says it's ok to print a message saying what is being loaded. Default comes from *LOAD-VERBOSE*, normally T. SET-DEFAULT-PATHNAME non-NIL says set the default pathname for LOAD to the name of this file. Default from *LOAD-SET-DEFAULT-PATHNAME*, normally T. IF-DOES-NOT-EXIST NIL says just return NIL for file-not-found. Default T. In all other cases the value is the truename of the loaded file, or T. PRINT non-NIL says print all forms loaded." (DECLARE (ARGLIST FILE &KEY PACKAGE (VERBOSE *LOAD-VERBOSE*) (SET-DEFAULT-PATHNAME *LOAD-SET-DEFAULT-PATHNAME*) (IF-DOES-NOT-EXIST T) PRINT)) (when fs:this-is-a-patch-file (cerror "Proceed to LOAD ~S anyway." "The use of LOAD in a patch file is not recommended." file)) (IF (AND (CAR KEY-OR-POSITIONAL-ARGS) (MEMQ (CAR KEY-OR-POSITIONAL-ARGS) '(:PACKAGE :PRINT :IF-DOES-NOT-EXIST :SET-DEFAULT-PATHNAME :VERBOSE))) (LET ((SI::PRINT-LOADED-FORMS (GETF KEY-OR-POSITIONAL-ARGS ':PRINT))) (LOAD-1 FILE (GETF KEY-OR-POSITIONAL-ARGS ':PACKAGE) (NOT (GETF KEY-OR-POSITIONAL-ARGS ':IF-DOES-NOT-EXIST T)) (NOT (GETF KEY-OR-POSITIONAL-ARGS ':SET-DEFAULT-PATHNAME *LOAD-SET-DEFAULT-PATHNAME*)) (NOT (GETF KEY-OR-POSITIONAL-ARGS ':VERBOSE *LOAD-VERBOSE*)))) (APPLY #'LOAD-1 FILE KEY-OR-POSITIONAL-ARGS))) )) ; From modified file DJ: L.SYS2; PATCH.LISP#184 at 21-Jul-88 18:57:40 #10R SYSTEM-INTERNALS#: (COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "SYSTEM-INTERNALS"))) (COMPILER::PATCH-SOURCE-FILE "SYS: SYS2; PATCH  " (defun load-patch-file (filename verbose-p) ;; I wish I could put the following hack in when the patch is being written. ;; Anyway, too many times, people make patches that reload files, ;; then the files get recompiled and do bizzare things. For example, ;; my 110 band is now useless now that 115 has incompatable qfasl's. ;; Therefore, I institute this policy of not allowing random qfasl's ;; to be loaded by a patch. If you want to do that, Add Patch the ;; whole file. This will also break the technique of using System patchs to load ;; other systems. - Pace ;;;The following technique had the horrible side-effect: upon warm-booting, ;;;the new "temporary" function value of LOAD became permanent. -Keith ;;(let ((real-load #'load)) ;;(letf (((symbol-function 'load) #'(lambda (&rest ignore) ;;(ferror nil "The use of ~S in a patch file is not supported." 'load)))) (load filename :verbose verbose-p :set-default-pathname nil)) ))