Skip to content

Commit

Permalink
Stop using InstallValue (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Jan 12, 2024
1 parent 1785fb9 commit 2081cc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
11 changes: 9 additions & 2 deletions gap/AutoDocMainFunction.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@
# SPDX-License-Identifier: GPL-2.0-or-later


DeclareGlobalVariable( "AUTODOC_XML_HEADER" );
BindGlobal( "AUTODOC_XML_HEADER",
Concatenation(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n",
"<!-- This is an automatically generated file. -->\n"
)
);

DeclareGlobalFunction( "AUTODOC_SetIfMissing" );
DeclareGlobalFunction( "AUTODOC_APPEND_STRING_ITERATIVE" );
DeclareGlobalFunction( "AUTODOC_MergeRecords" );
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.
Expand Down
12 changes: 0 additions & 12 deletions gap/AutoDocMainFunction.gi
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later

##
InstallValue( AUTODOC_XML_HEADER,
Concatenation(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n",
"<!-- This is an automatically generated file. -->\n"
)
);

InstallValue( _AUTODOC_GLOBAL_OPTION_RECORD,
rec( AutoDocMainFile := "_AutoDocMainFile.xml" ) );


InstallGlobalFunction( AUTODOC_SetIfMissing,
function( record, name, val )
if not IsBound( record.(name) ) then
Expand Down

0 comments on commit 2081cc5

Please sign in to comment.