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: mheaney@ni.net (Matthew Heaney) Subject: Re: Ada95 Pretty-Printers Date: 1997/06/11 Message-ID: #1/1 X-Deja-AN: 247795473 References: <339C58A6.4D5A@sprintmail.com> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-06-11T00:00:00+00:00 List-Id: In article <339C58A6.4D5A@sprintmail.com>, johnvolan@sprintmail.com wrote: >Are there any pretty-printers out there for Ada95? I'm looking for >something that can serve as an alternative to the pretty-printer built >into Rational's Apex. Apex is frustrating because it actively reformats >almost every syntactic structure in Ada to suit Rational's coding style. >This style is based on the LRM, but it does certain things that are >fairly intrusive. For instance, if you've gone to the trouble of >formatting a parameter list like so: > > procedure Operation > (This : in This_Type; > That : in That_Type; > Other : out Other_Type); > >Apex will ignore your line breaks and alignment, and reformat it like >so: > > procedure Operation (This : in This_Type; That : in That_Type; > Other : out Other_Type); A simple fix: go into your switches file and turn on manual pretty-printing. I agree with you that Rational's pretty-printer only makes things worse. But what about emacs? It facilitates the entry of source text, and you can teach it to format your code any way you want. At least on my system (Sun Solaris), the folks at Rational customized emacs so that it's completely integrated with Apex. Their tailored version is called aemacs (it's a script that calls the real emacs). Yes, you can run the normal GUI APEX and use emacs as the editor, but I've completely ditched the GUI front end; I just use aemacs now as my front end. (Realize that APEX has a command line interface: the GUI just calls the commands you can type from an APEX shell.) Do this % apexinit -emacs -nogui and emacs runs in your xterm, and acts as the APEX front end. I do all my compiles in emacs, and visits, etc. I lose no APEX functionality by using emacs. Of course, you can still run APEX with a GUI, and use emacs as the editor. It's still integrated, and you can still do compiles in the editor, etc. I bring this up because you can make emacs do whatever you want. If you don't like what it does, you can change it. You could even use Rolf Ebert's ada-mode, available from the NYU ftp site. And you can even have emacs call the pretty-printer of your choice. Emacs, it's not your parent's editor, eh? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271