Commit 8bdc02c2 by Bob Duff Committed by Arnaud Charlet

gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.

2014-01-23  Bob Duff  <duff@adacore.com>

	* gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.

From-SVN: r206988
parent e949ee22
2014-01-23 Bob Duff <duff@adacore.com>
* gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
2014-01-23 Robert Dewar <dewar@adacore.com> 2014-01-23 Robert Dewar <dewar@adacore.com>
* gnatlink.adb (Gnatlink): Fix problem of generating bad name * gnatlink.adb (Gnatlink): Fix problem of generating bad name
......
...@@ -14501,6 +14501,16 @@ Display Copyright and version, then exit disregarding all other options. ...@@ -14501,6 +14501,16 @@ Display Copyright and version, then exit disregarding all other options.
@cindex @option{--help} @command{gnatpp} @cindex @option{--help} @command{gnatpp}
Display usage, then exit disregarding all other options. Display usage, then exit disregarding all other options.
@item --pp-off=@var{xxx}
@cindex @option{--pp-off} @command{gnatpp}
Use @code{--xxx} as the command to turn off pretty printing, instead
of the default @code{--&pp off}.
@item --pp-on=@var{xxx}
@cindex @option{--pp-on} @command{gnatpp}
Use @code{--xxx} as the command to turn pretty printing back on, instead
of the default @code{--&pp on}.
@item --pp-old @item --pp-old
@cindex @option{--pp-old} @command{gnatpp} @cindex @option{--pp-old} @command{gnatpp}
Use the old formatting algorithms. Use the old formatting algorithms.
...@@ -14535,12 +14545,39 @@ comments, program layout, and name casing. ...@@ -14535,12 +14545,39 @@ comments, program layout, and name casing.
They provide the detailed descriptions of the switches shown above. They provide the detailed descriptions of the switches shown above.
@menu @menu
* Disabling Pretty Printing::
* White Space and Empty Lines:: * White Space and Empty Lines::
* Formatting Comments:: * Formatting Comments::
* Construct Layout:: * Construct Layout::
* Name Casing:: * Name Casing::
@end menu @end menu
@node Disabling Pretty Printing
@subsection Disabling Pretty Printing
@noindent
Pretty printing is highly heuristic in nature, and sometimes doesn't
do exactly what you want. If you wish to format a certain region of
code by hand, you can turn off pretty printing in that region by
surrounding it with the special comments @code{--&pp off} and
@code{--&pp on}. The text in that region will then be reproduced
verbatim in the output with no formatting.
To disable pretty printing for the whole file, put @code{--&pp off} at
the top, with no following @code{--&pp on}.
The comments must appear on a line by themselves, with nothing
preceding except spaces, and they must appear exactly as shown (case
sensitive). For example, @code{--&pp off -- Turn off pp because ...}
will not be recognized as a valid @code{--&pp off} command.
You can specify different comment strings using the gnatpp
@code{--pp-off} and @code{--pp-on} switches. For example, if you say
@code{gnatpp --pp-off=' pp-' *.ad?} then gnatpp will recognize
comments of the form @code{-- pp-}, instead of @code{--&pp off} for
disabling pretty printing. Note that the leading @code{--} of the
comment is not included in the argument to these switches.
@node White Space and Empty Lines @node White Space and Empty Lines
@subsection White Space and Empty Lines @subsection White Space and Empty Lines
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment