[Emacs-ada-mode] Teaching ada-mode to ignore embedded SQL statements?

Markus Schöpflin markus.schoepflin at comsoft.de
Tue Feb 3 03:19:23 PST 2009


Hello,

we are using embedded SQL to access a database in Ada. Example pseudo code:

procedure foo
is
    exec sql begin declare section;
       DB_NAME : STRING := "foo";
    exec sql end declare section;
begin
    exec sql connect :DB_NAME session 1;
end foo;

The problem is that the indentation of ada-mode gets confused by the 
begin/end/declare following the 'exec sql' string, resulting in the 
following indentation:

procedure foo
is
    exec sql begin declare section;
    DB_NAME : STRING := "foo";
    exec sql end declare section;
    begin
       exec sql connect :DB_NAME session 1;
    end foo;

Is there a way to make ada-mode ignore statements starting with 'exec sql' 
up to the next ';' when indenting?

TIA for any help!

Regards,
Markus



More information about the Emacs-ada-mode mailing list