diff --git a/lib/files.gi b/lib/files.gi index 72da214a55..80676caa48 100644 --- a/lib/files.gi +++ b/lib/files.gi @@ -193,6 +193,8 @@ end); ## #M Read( ) . . . . . . . . . . . . . . . . . . . read in a file ## +## READ_INDENT is used to indent diagnostic messages +## while reading files READ_INDENT := ""; if IsHPCGAP then MakeThreadLocal("READ_INDENT"); @@ -204,20 +206,20 @@ InstallMethod( Read, function ( name ) local readIndent; - if GAPInfo.CommandLineOptions.D then + if InfoLevel(InfoRead) >= 5 then readIndent := SHALLOW_COPY_OBJ( READ_INDENT ); APPEND_LIST_INTR( READ_INDENT, " " ); - Print( "#I", READ_INDENT, "Read( \"", name, "\" )\n" ); + Info(InfoRead, 5, READ_INDENT, "Read( \"", name, "\" )" ); fi; if not READ(UserHomeExpand(name)) then Error( "file \"", name, "\" must exist and be readable" ); fi; - if GAPInfo.CommandLineOptions.D then + if InfoLevel(InfoRead) >= 5 then READ_INDENT := readIndent; if READ_INDENT = "" then - Print( "#I Read( \"", name, "\" ) done\n" ); + Info(InfoRead, 5, "Read( \"", name, "\" ) done" ); fi; fi; end );