On Mon, Feb 8, 2016 at 11:33 AM, Stephen Leake <[email protected]> wrote: > The first line of this comment should be a shortcut to the file > containing the test code: test/p.ads. That way, you can use a binding to > `find-file-at-point' (C-F12 for me) to navigate to directly to the test.
Right. > I'd prefer a longer name for the test file, or include this test in an > existing package. "SPARK_Mode" is recognized by GNAT GPL 2014 (which is > what I'm testing with), so this can go in an existing package; > ada_mode-nominal.ads. That changes the test of ada-*-statement-keyword. Right. > > + ;; with SPARK_Mode => On > + ;; indenting 'with' > + (save-excursion > + (wisi-backward-token) > + (+ (current-column) ada-indent-broken))) > > There's a bug in the grammar here. At this point in the code, point is > on the token containing the aspect, which is P. But it should be > "package", so the indentation is dependent on the keyword, not the name. > Then you would not need "wisi-backward-token". And it changes > "package_specification" to "package_declaration". Containment in name seemed suspicious from the start, but I decided to do the least intrusive fix. > As Simon pointed out, aspects with types are aligned with "type", so > these should be aligned with "package". This looks better when there is > a list of aspects: > > package Ada_Mode.Nominal > with > SPARK_Mode => On, > foo => bar > is I fully agree with your justification. > Full patch attached. I will now extend this patch to other aspects that currently cause indentation exceptions: in package body (which I already reported in this thread), protected body and all the _stub constructs. Thank you for review and all corrections! -- Piotr Trojanek _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
