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

From: Markus Triska <[email-masked]>
Date: Wed, 30 Sep 2015 20:03:32 +0200

Stefan Monnier <[email-masked]> writes:

>>    test_predicate(c) :- !,
>>            test_goal1,
>>            test_goal2.
> Should work now.

Here are cases I found that still deviate from Stefan Bruda's version,
in case you are interested in fixing them. His version yields:

   my_nice_test(X) :- var(X), !,
           test_goal1,
           test_goal2.

   my_nice_test --> !,
           test_goal1,
           test_goal2.

whereas the current Emacs version yields:

   my_nice_test(X) :- var(X), !,
                      test_goal1,
                      test_goal2.

   my_nice_test --> !,
                    test_goal1,
                    test_goal2.

Notice that !/0 typically appears as the last goal on a line, but other
short goals often appear on the same line before !/0 in such patterns.

All the best,
Markus