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

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

Stefan Monnier <[email-masked]> writes:

> Hmmm you definitely shouldn't get
>
>     testHERE(a, b).
>
> but you should get
>
>     HEREtest(a, b).
>
> IOW, it's not a bug, it's a feature: the new code knows about infix
> operators and knows how to jump over the left-hand-side or
> right-hand-side of an infix operator.

But it does not do so consistently: C-M-b jumps back up to including the
predicate name, but C-M-f from that position only jumps forward up to
the opening parenthesis, and not including the whole construct.

In other words, starting from:

    test(a,b).HERE

pressing C-M-b yields:

    HEREtest(a,b).

but then C-M-f yields:

    testHERE(a,b).

whereas one would expect, for internal consistency:

    test(a,b).HERE

All the best,
Markus