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 #646. Indentation of function arguments. #647

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

Matafou
Copy link
Contributor

@Matafou Matafou commented Mar 25, 2022

Fix #646. Now indentation of function arguments are indented wrt to the function instead of aligned with the first argument. See details below.

Questions

  • Is it too late for the including this in the soon to come V.4.5 tag? The indentation CI test are a good clue that this does not break indentation too much but we may wait for users to test this a bit.
  • should we make the old behaviour still possible with a switch? I don't thinks coq-indent-box-style would be the right switch. I am not found of addig one more switch.

Details

This patch indents like this:

Definition foo :=
  myfunction (args1) arg2
    arg3.

instead of

Definition foo :=
  myfunction (args1) arg2
             arg3.

Besides when a function application is placed immediately after (and on the same line as) a "Com start" token, indentation is computed from the "Com start" instead. Because in practice the command start is the real function call. eg.:

Require Import
  Foo.

instead of

Require Import
        Foo.

A few tests have been added to check this new cases.
A few tests have been modified to reflect the change.

@Matafou
Copy link
Contributor Author

Matafou commented Mar 25, 2022

also implements one of the feature wishes of #621 for indenting records ":=" asymmetrically.

@Matafou
Copy link
Contributor Author

Matafou commented Mar 25, 2022

pushed a few more comments.

@Matafou Matafou merged commit 0b34544 into ProofGeneral:master Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

indentation of function application arguments
1 participant