From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,19b6efa2ecebaed0 X-Google-Attributes: gid103376,public From: Rolf Ebert Subject: Re: Ada95 Pretty-Printers Date: 1997/06/11 Message-ID: #1/1 X-Deja-AN: 247722556 References: <339C58A6.4D5A@sprintmail.com> Organization: Rolf Ebert from home Newsgroups: comp.lang.ada Date: 1997-06-11T00:00:00+00:00 List-Id: >>>>> "JGV" == John G Volan writes: JGV> Are there any batch pretty-printers out there (commercial or free) JGV> that can do syntax-level indenting while still respecting the JGV> user's line-breaks? Or even better, are there any pretty-printers JGV> that can actively reformat, but which are customizable, maybe using JGV> syntax templates? (For instance, if one of our programmers forgets JGV> to put a "then" on a separate line, we'd rather have a tool that JGV> could automatically move it for him, rather than beat him up in a JGV> walkthrough for something as trivial as code format.) The answer to almost any question is Emacs. Emacs can do everything :-) Look at the emacs-ada-mode package at cs.ny.edu:/pub/gnat. In its contrib directory there is a short file which uses Emacs in batch mode for reindenting files. The documentation explains the user options which control indenting. The current Emacs-reformatter never changes newlines, though. But you have the sources and can of course adapt it to your needs. I admit, it is very slow. Try to do that with vi. Rolf ebert@waporo.muc.de