comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Ada95 Pretty-Printers
Date: 1997/06/11
Date: 1997-06-11T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680001106972108060001@news.ni.net> (raw)
In-Reply-To: 339C58A6.4D5A@sprintmail.com


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
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  parent reply	other threads:[~1997-06-11  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <339C58A6.4D5A@sprintmail.com>
1997-06-10  0:00 ` Ada95 Pretty-Printers Samuel Mize
1997-06-10  0:00   ` stuman
1997-06-10  0:00   ` John G. Volan
1997-06-11  0:00     ` Samuel Mize
1997-06-12  0:00     ` John G. Volan
1997-06-13  0:00       ` Samuel Mize
1997-06-14  0:00         ` Robert Dewar
1997-06-14  0:00           ` Samuel Mize
1997-06-14  0:00             ` Robert Dewar
1997-06-14  0:00         ` Tom Phinney
1997-06-12  0:00     ` Robert Dewar
1997-06-10  0:00   ` John G. Volan
1997-06-10  0:00     ` Spam Hater
1997-06-10  0:00       ` Spam Hater
1997-06-16  0:00     ` Greg Gicca @pulsar
1997-06-10  0:00 ` Anonymous
1997-06-10  0:00   ` John G. Volan
1997-06-11  0:00 ` Matthew Heaney [this message]
1997-06-11  0:00 ` Rolf Ebert
1997-06-11  0:00   ` John G. Volan
1997-06-12  0:00 ` Jeff Burns
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox