ada-mode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ada-mode-users] Indenting incomplete code during editing


From: Ludovic Brenta
Subject: Re: [Ada-mode-users] Indenting incomplete code during editing
Date: Wed, 26 Oct 2016 18:15:53 +0200
User-agent: Roundcube Webmail/0.5.3

Stephen Leake wrote:
<snip>
Now, point is before the closing paren and the user types ; RET to
insert a second parameter.  They expect the new line to be indented
and point to be under the P of Param, like so with * standing for
point:
<snip>

Instead they get this:

package body P is
procedure G (Param : in Boolean;
*) is
  begin
    Some_Statement;
  end G;
end P;

I agree this is not friendly; patch below.

Not having access to the monotone server from the office, I tried to
apply this patch in-place in my installation of emacs, like so:

--- ada-mode/ada-grammar-wy.el
+++ ada-mode/ada-grammar-wy.el
@@ -1248,10 +1248,11 @@
         (wisi-containing-action 1 2))))
       (parameter_profile_opt
        (())
        ((formal_part )))
       (parameter_specification
+       (())
((identifier_list COLON aliased_opt mode_opt null_exclusion_opt name COLON_EQUAL expression )
         (wisi-face-action [6 font-lock-type-face]))
((identifier_list COLON aliased_opt mode_opt null_exclusion_opt name )
         (wisi-face-action [6 font-lock-type-face]))
((identifier_list COLON aliased_opt access_definition COLON_EQUAL expression ))

but this breaks the parser and indentation engine completely (RET
indents the current line wrongly no matter where you tupe it).  I must
have done something wrong.  Could you send me the patch to the
generated file resulting from your change in the grammar?

--
Ludovic Brenta.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]