GNU bug report logs - #21526
24.5; prolog-mode: broken indentation for if-then-else construct

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sun, 20 Sep 2015 16:21:01 UTC

Severity: minor

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Markus Triska <triska <at> metalevel.at>
To: 21526 <at> debbugs.gnu.org
Subject: bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct
Date: Mon, 21 Sep 2015 08:02:32 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I installed the patch below which should fix many of your problems.

Thank you! There are several remaining issues. First, if-then-else
constructs can be nested. For example, when I have:


   test :-
           (   a,
               HERE

and press "(", then, in the prolog.el supplied by Stefan Bruda and using
the settings I posted, I get:


   test :-
           (   a,
               (   HERE

That is, it automatically indents for placing the next "if" as expected.

Eventually, a nested mixed disjunction/if-then-else may either look like:

   test :-
           (   a,
               (   b ->
                   (   c ->
                       d
                   ;   e
                   )
               ;   f
               )
           ;   g
           ).

or:

   test :-
           (   a,
               (   b
               ->  (   c
                   ->  d
                   ;   e
                   )
               ;   f
               )
           ;   g
           ).

When I try it with your patch, it fails to indent subsequent lines.

> IIUC the only remaining issue is the indentation we get when the line is
> empty.

This issue also remains. Thank you!

All the best,
Markus





This bug report was last modified 4 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.