5.2 \version in documentation files

Every documentation file that includes LilyPond code should begin with a \version statement, referencing a version of LilyPond that is consistent with the syntax of the contained code. Since the \version statement is not valid Texinfo input it must be put into a comment like this:

@c \version "2.24.1"

So, if you are adding LilyPond code not consistent with the current version header, you should

  1. run convert-ly on the file using the latest version of LilyPond (which should, if everybody has done proper maintenance, not change anything);
  2. add the new code;
  3. modify the version number to match the new code.

LilyPond Contributor’s Guide v2.25.22 (development-branch).