diff --git a/.gitignore b/.gitignore
index e8975537b4..5d67442b54 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,6 +66,7 @@ doc/*/*.tex
/doc/*/*.out
doc/gapmacrodoc.example-1.tst
doc/gapmacrodoc.idx
+doc/ref/user_pref_list.xml
# GAP packages
/bootstrap-pkg-full.tar.gz
diff --git a/doc/make_doc.in b/doc/make_doc.in
index de3dd03f74..4486ae3656 100644
--- a/doc/make_doc.in
+++ b/doc/make_doc.in
@@ -18,6 +18,7 @@ echo "--------------------"
base:="@abs_top_srcdir@";;
books:=["ref", "tut", "hpc", "dev"];;
latexOpts := rec(Maintitlesize := "\\\\fontsize{36}{38}\\\\selectfont");;
+UpdateXMLForUserPreferences();
for run in [1,2] do
for book in books do
path := Concatenation(base, "/doc/", book);
diff --git a/doc/ref/user_pref_list.xml b/doc/ref/user_pref_list.xml
deleted file mode 100644
index d3f8a8d3fb..0000000000
--- a/doc/ref/user_pref_list.xml
+++ /dev/null
@@ -1,330 +0,0 @@
-
-
-Autocompleter
-Autocompleter
-
--
-Set how names are filtered during tab-autocomplete, this can be:
-"default": case-sensitive matching. "case-insensitive":
-case-insensitive matching, or a record with two components named filter
-and completer, which are both functions which take two arguments.
-filter takes a list of names and a partial identifier and returns all
-the members of names which are a valid extension of the partial
-identifier. completer takes a list of names and a partial identifier
-and returns the partial identifier as extended as possible (it may also change
-the identifier, for example to correct the case, or spelling mistakes), or
-returns fail to leave the existing partial identifier.
-
-This preference is ignored if ⪆ was not compiled with readline support.
-
-
-
-Default: "default".
-
-
-Editor
-EditorOptions
-Editor,
-EditorOptions
-
--
-Determines the editor and options (used by ⪆'s
-command). Under macOS, the value "open" for Editor will work.
-For further options, see the ⪆ help for . If you want to
-use the editor defined in your (shell) environment then leave the
-Editor and EditorOptions preferences empty.
-
-
-
-The defaults are computed at runtime.
-
-
-ExcludeFromAutoload
-ExcludeFromAutoload
-
--
-These packages are not loaded at ⪆ startup. This doesn't work for packages
-which are needed by the ⪆ library, or which are already loaded in a
-workspace.
-
-
-
-Default: "".
-
-
-HelpViewers
-XpdfOptions
-XdviOptions
-HelpViewers,
-XpdfOptions,
-XdviOptions
-
--
-Here you can choose your preferred help viewers. See the help for
for further options.
-
-Try HelpViewers:= [ "screen", "firefox", "xpdf" ];.
-
-(For "screen" we also suggest to set the Pager entry to
-"less".)
-
-
-
-Defaults: [ [ "screen" ], "", "" ].
-
-
-HistoryBackwardSearchSkipIdenticalEntries
-HistoryBackwardSearchSkipIdenticalEntries
-
--
-When a command is executed multiple times, it is also stored in history
-multiple times. Setting this option to true skips identical entries
-when searching backwards in history.
-
-
-
-Admissible values:
-true,
-false.
-
-
-
-Default: false.
-
-
-HistoryMaxLines
-SaveAndRestoreHistory
-HistoryMaxLines,
-SaveAndRestoreHistory
-
--
-HistoryMaxLines is the maximal amount of input lines held in ⪆'s
-command line history.
-
-If SaveAndRestoreHistory is true then ⪆ saves its command
-line history before terminating a ⪆ session, and prepends the stored
-history when ⪆ is started. If this is enabled it is suggested to set
-HistoryMaxLines to some finite value. It is also possible to set
-HistoryMaxLines to
to keep arbitrarily many
-lines.
-
-These preferences are ignored if ⪆ was not compiled with readline support.
-
-
-
-Defaults: [ 10000, true ].
-
-
-InfoPackageLoadingLevel
-InfoPackageLoadingLevel
-
--
-Info messages concerning package loading up to this level are printed. The
-level can be changed in a running session using
.
-
-
-
-Admissible values:
-1,
-2,
-3,
-4.
-
-
-
-Default: 1.
-
-
-MaxBitsIntView
-MaxBitsIntView
-
--
-Maximal bit length of integers to View unabbreviated. Default is about
-30 lines of a 80 character wide terminal. Set this to 0
-to avoid abbreviated ints.
-
-
-
-Default: 8000.
-
-
-PartialPermDisplayLimit
-NotationForPartialPerms
-PartialPermDisplayLimit,
-NotationForPartialPerms
-
--
-options for the display of partial perms
-
-
-
-Defaults: [ 100, "component" ].
-
-
-TransformationDisplayLimit
-NotationForTransformations
-TransformationDisplayLimit,
-NotationForTransformations
-
--
-options for the display of transformations
-
-
-
-Defaults: [ 100, "input" ].
-
-
-PackagesToIgnore
-PackagesToIgnore
-
--
-These packages are not regarded as available. This doesn't work for packages
-which are needed by the ⪆ library, or which are already loaded in a
-workspace.
-
-
-
-Default: "".
-
-
-PackagesToLoad
-PackagesToLoad
-
--
-A list of names of packages which should be loaded during startup. For
-backwards compatibility, the default lists most of packages that were
-autoloaded in ⪆ 4.4 (add or remove packages as you like).
-
-
-
-Default: [ "autpgrp", "alnuth", "crisp", "ctbllib", "factint", "fga", "irredsol", "laguna", "polenta", "polycyclic", "resclasses", "sophus", "tomlib" ].
-
-
-Pager
-PagerOptions
-Pager,
-PagerOptions
-
--
-For displaying help pages on screen and other things ⪆ has a rudimentary
-builtin pager. We recommend using a more sophisticated external program. For
-example, when you have the program less on your computer we recommend:
-
-Pager := "less";
-
-PagerOptions := ["-f", "-r", "-a", "-i", "-M", "-j2"];
-
-If you want to use more, we suggest to use the -f option. If you
-want to use the pager defined in your environment then leave the Pager
-and PagerOptions preferences empty.
-
-
-
-The defaults are computed at runtime.
-
-
-ReadObsolete
-ReadObsolete
-
--
-May be useful to say false here to check if you are using commands
-which may vanish in a future version of ⪆
-
-
-
-Admissible values:
-true,
-false.
-
-
-
-Default: true.
-
-
-ReproducibleBehaviour
-ReproducibleBehaviour
-
--
-This preference disables code in ⪆ which changes behaviour based on time
-spent, and therefore can produce different results depending on how much time
-is taken by other programs running on the same computer. This option may lead
-to slower or lower-quality results. Note that many algorithms in ⪆ use the
-global random number generator, which is NOT affected by this option. This
-only tries to ensure the same version of ⪆, with the same package versions
-loaded, on the same machine, running the same code, in a fresh ⪆ session,
-will produce the same results.
-
-
-
-Admissible values:
-true,
-false.
-
-
-
-Default: false.
-
-
-ShortBanners
-ShortBanners
-
--
-If this option is set to true, package banners printed during loading
-will only show the name, version and description of a package.
-
-
-
-Admissible values:
-true,
-false.
-
-
-
-Default: false.
-
-
-UseColorPrompt
-UseColorPrompt
-
--
-In a color capable terminal (almost any terminal application) you can run
-⪆ such that the prompts, the input and output are distinguished by colors.
-Options are true, false or some record as explained in the help
-section for
.
-
-
-
-Default: true.
-
-
-UseColorsInTerminal
-UseColorsInTerminal
-
--
-Almost all current terminal emulations support color display, setting this to
-true implies a default display of most manuals with color markup. It
-may influence the display of other things in the future.
-
-
-
-Admissible values:
-true,
-false.
-
-
-
-Default: true.
-
-
-ViewLength
-ViewLength
-
--
-A bound for the number of lines printed when Viewing some large
-objects.
-
-
-
-Default: 3.
-
-
diff --git a/lib/userpref.g b/lib/userpref.g
index fc4e0300cb..401be31e29 100644
--- a/lib/userpref.g
+++ b/lib/userpref.g
@@ -822,6 +822,24 @@ BindGlobal( "XMLForUserPreferences", function( pkgname )
end );
+#############################################################################
+##
+#F UpdateXMLForUserPreferences()
+##
+## Update the file doc/ref/user_pref_list.xml if necessary.
+##
+BindGlobal( "UpdateXMLForUserPreferences", function()
+ local file, old, new;
+
+ file:= Filename(DirectoriesLibrary("doc")[1], "ref/user_pref_list.xml");
+ old:= StringFile(file);
+ new:= XMLForUserPreferences("GAP");
+ if old <> new then
+ FileString(file, new);
+ fi;
+ end );
+
+
#############################################################################
##
#F WriteGapIniFile( [
, ][true] )
diff --git a/tst/extractmanuals.g b/tst/extractmanuals.g
index 3b42106bef..8b3e862f20 100644
--- a/tst/extractmanuals.g
+++ b/tst/extractmanuals.g
@@ -52,6 +52,7 @@ pathtodoc := DirectoriesLibrary("doc/ref");
Read(Filename(pathtodoc, "makedocreldata.g"));
GAPInfo.ManualDataRef.pathtodoc := pathtodoc;
GAPInfo.ManualDataRef.pathtoroot := DirectoriesLibrary("");
+UpdateXMLForUserPreferences();
WriteExamplesTst( testdir, GAPInfo.ManualDataRef );
#
diff --git a/tst/testinstall/userpref.tst b/tst/testinstall/userpref.tst
deleted file mode 100644
index bd08d50053..0000000000
--- a/tst/testinstall/userpref.tst
+++ /dev/null
@@ -1,28 +0,0 @@
-#@local comp,file,len,pos
-gap> START_TEST( "userpref.tst" );
-
-# Check whether the documentation of user preferences
-# coincides with their declarations.
-gap> comp:= XMLForUserPreferences( "GAP" );;
-gap> file:= StringFile( Filename( DirectoriesLibrary( "doc" ),
-> "ref/user_pref_list.xml" ) );;
-gap> if comp <> file then
-> len:= Minimum( Length( file ), Length( comp ) );;
-> Print( "Replace 'doc/ref/user_pref_list.xml' with the result of\n",
-> "XMLForUserPreferences( \"GAP\" )\n" );
-> if Length( file ) <> Length( comp ) then
-> Print( "(lengths differ: ", Length( file ), " vs. ",
-> Length( comp ), ")\n" );
-> fi;
-> pos:= First( [ 1 .. len ], i -> file[i] <> comp[i] );
-> if pos <> fail then
-> Print( "first difference at ", pos, ":\n",
-> "in doc/ref/user_pref_list.xml:\n",
-> file{ [ Maximum( 1, pos-30 ) .. Minimum( pos+30, len ) ] }, "\n",
-> "\nin result of XMLForUserPreferences( \"GAP\" ):\n",
-> comp{ [ Maximum( 1, pos-30 ) .. Minimum( pos+30, len ) ] }, "\n" );
-> fi;
-> fi;
-
-#
-gap> STOP_TEST( "userpref.tst" );