Skip to content

Commit 7c3778d

Browse files
ChrisJeffersonfrankluebeck
authored andcommitted
Use 'InfoOutput' to get Info output stream
The current code will also work with older versions of GAP. It will be simplified at a later stage.
1 parent ed92b19 commit 7c3778d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

init.g

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@
1010
# An alternative Info handler which does not print implicit "#I " and "\n"
1111
BindGlobal("PlainInfoHandler",
1212
function ( infoclass, level, list )
13-
local cl, out, s;
14-
cl := InfoData.LastClass![1];
15-
if IsBound(InfoData.Output[cl]) then
16-
out := InfoData.Output[cl];
13+
local cl, out, s, infoOutput;
14+
if IsBoundGlobal("InfoOutput") then
15+
infoOutput := ValueGlobal("InfoOutput");
16+
out := infoOutput(infoclass);
1717
else
18-
out := DefaultInfoOutput;
18+
cl := InfoData.LastClass![1];
19+
if IsBound(InfoData.Output[cl]) then
20+
out := InfoData.Output[cl];
21+
else
22+
out := DefaultInfoOutput;
23+
fi;
1924
fi;
2025
if out = "*Print*" then
2126
for s in list do

0 commit comments

Comments
 (0)