From 2081cc5b1d6e44aab036675a975fa49e7393885c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 12 Jan 2024 02:33:25 +0100 Subject: [PATCH] Stop using InstallValue (#274) --- gap/AutoDocMainFunction.gd | 11 +++++++++-- gap/AutoDocMainFunction.gi | 12 ------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/gap/AutoDocMainFunction.gd b/gap/AutoDocMainFunction.gd index c427fdd5..8f99e2d6 100644 --- a/gap/AutoDocMainFunction.gd +++ b/gap/AutoDocMainFunction.gd @@ -6,7 +6,13 @@ # SPDX-License-Identifier: GPL-2.0-or-later -DeclareGlobalVariable( "AUTODOC_XML_HEADER" ); +BindGlobal( "AUTODOC_XML_HEADER", + Concatenation( + "\n\n", + "\n" + ) +); + DeclareGlobalFunction( "AUTODOC_SetIfMissing" ); DeclareGlobalFunction( "AUTODOC_APPEND_STRING_ITERATIVE" ); DeclareGlobalFunction( "AUTODOC_MergeRecords" ); @@ -14,7 +20,8 @@ DeclareGlobalFunction( "AUTODOC_PROCESS_INTRO_STRINGS" ); DeclareGlobalFunction( "AutoDocScanFiles" ); ## Global option record -DeclareGlobalVariable( "_AUTODOC_GLOBAL_OPTION_RECORD" ); +BindGlobal( "_AUTODOC_GLOBAL_OPTION_RECORD", + rec( AutoDocMainFile := "_AutoDocMainFile.xml" ) ); ## ## This function creates a title file. It must be called with the package name and the path to doc files. diff --git a/gap/AutoDocMainFunction.gi b/gap/AutoDocMainFunction.gi index 2d9f601f..b2305c22 100644 --- a/gap/AutoDocMainFunction.gi +++ b/gap/AutoDocMainFunction.gi @@ -5,18 +5,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -## -InstallValue( AUTODOC_XML_HEADER, - Concatenation( - "\n\n", - "\n" - ) -); - -InstallValue( _AUTODOC_GLOBAL_OPTION_RECORD, - rec( AutoDocMainFile := "_AutoDocMainFile.xml" ) ); - - InstallGlobalFunction( AUTODOC_SetIfMissing, function( record, name, val ) if not IsBound( record.(name) ) then