bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21526: 24.5; prolog-mode: broken indentation for if-then-else constr


From: Markus Triska
Subject: bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct
Date: Tue, 22 Sep 2015 08:25:13 +0200

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> When I try it with your patch, it fails to indent subsequent lines.
>
> Ugh!  That should be fixed now (see patch below).

Great, thank you!

> Right.  This one requires thinking (but will benefit other modes as
> well).

This will make the new mode much more useable, so thank you for looking
into this! Currently, not only is the new empty line indented in a
distracting and unexpected way, but closing the bock does not indent it
as expected either. For example, when I press RET at:

   test :-
           (   a
           ;   bHERE

then I get:

   test :-
           (   a
           ;   b
                       HERE

and when I then press ")" followed by "." to end the block, I get:

   test :-
           (   a
           ;   b
                       ).

Previously you suggested to make "." electric, this would fix this,
however, I expect the correct indentation already when pressing ")":

   test :-
           (   a
           ;   b
           )

because the block need not end with "." but can look for example like:

   test :-
           (   a
           ;   b
           ),
           c.

I hope this helps.

All the best,
Markus






reply via email to

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