[Emacs-ada-mode] Main programs

Stephen Leake stephen_leake at stephe-leake.org
Wed Nov 19 05:49:04 PST 2008


Simon Wright <simon.j.wright at mac.com> writes:

> I notice that ada-mode doesn't parse 'for Main use ("main- 
> program");' 

I assume that statement is in a gpr file.

By "doesn't parse" do you mean "throws an error" or "doesn't seem to
use the value"?

> (actually I'm not sure whether that should be the unit name or the
> file name!). The current scheme seems to be 'assume that the unit in
> the current buffer when you load a GPR is the main program'; might
> be better to leave it up to the GPR to specify - until overridden by
> a 'Set main and build'.

Ah; you want to set the main program in the Emacs Ada mode project
settings from the statment in the GPR file.

This is problematic; there can be many programs listed in the "for
Main" statement (the parens mean it's a list of strings); which would
we use for the single current Emacs Ada mode project main program?

Also, the current output from gnatls doesn't list this setting. I
don't see any 'gnat ...' commands that do output this information. So
we'd have to add one, after figuring out the Ada code that would
return it (the 'gnat list' source is _not_ pretty!).

As a work-around, you can set a single main program in the Emacs Ada
mode project file.

-- 
-- Stephe



More information about the Emacs-ada-mode mailing list