Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PrintFormattingStatus and SetPrintFormattingStatus for the standard output (i.e., when the first argument is "*stdout*" and add a variant that deals with the current output (whatever that may be), reachable by using "*current*" as first argument #4555

Merged

Commits on Jun 17, 2021

  1. Improve SetPrintFormattingStatus for stdout

    - add PRINT_FORMATTING_STDOUT to query the current state
    - use that to remove GAPInfo.FormattingStatusStdout (this way we only
      track this piece of state once, in the kernel; tracking something twice
      always carries the risk of getting out of sync)
    - add a test to check that all of these work correctly
    fingolfin committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    05d647f View commit details
    Browse the repository at this point in the history
  2. Add (Set)PrintFormattingStatus for current output

    This is useful for modifying the formatting status in test files
    
    Also useful for code that wants to print to whatever the current
    output is without formatting, but which does not control what
    the current output is (e.g. methods for `Print`).
    fingolfin committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    a840a43 View commit details
    Browse the repository at this point in the history
  3. Replace GAPDoc's PrintFormattedString by PrintWithoutFormatting

    `PrintWithoutFormatting` is a new helper function which calls
    `(Set)PrintFormattingStatus("*current*")` suitably to temporarily
    modify the formatting status for the currently active output stream.
    
    This requires adjusting one test for `Info`, which printed a notice
    about `InfoGlobal` which was in turn caused by a call to `IsBoundGlobal`
    removed by this patch.
    fingolfin committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    4a326aa View commit details
    Browse the repository at this point in the history