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: Stefan Monnier
Subject: bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct
Date: Tue, 29 Sep 2015 22:07:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> (1) Parentheses matching does not work yet. When I have a fact like:
>
>    test(a, b).HERE
>
> (with point again at the H) and press C-M-b (backward-sexp), I expect to
> see, as with prolog.el directly supplied by Stefan Bruda:
>
>    testHERE(a, b).
>
> Instead, I currently unexpectedly get:
>
>    HERE
>    test(a, b).

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.

Tho it seems the feature is not working 100%.  Indeed, I can reproduce
this problem, but only at the beginning of the buffer.  IOW if I have

   test(a).

   test(b).HERE

and I hit C-M-b I correctly end at

   HEREtest(b).

Since the problem only shows up on the very first element, it's not
too serious, but of course, we'd welcome a patch to fix it.

> (2) When I set `prolog-electric-dot-flag' to t, and enter, at
> (point-min) of an empty Prolog mode buffer from "emacs -Q -nw":

>    RET RET RET t e s t .

> then I see that the first line of the buffer is briefly highlighted,

Right, that's the same problem: you should see the first "t"
highlighted instead (since the dot closes the rule, which starts at the
first "t").


        Stefan





reply via email to

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