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 23:28:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Here are further test cases I found when trying this patch:
>
> (1) After evaluating (show-paren-mode 1) and using the Prolog content:
>
>    t1 :- a.
>    t2 :- b.HERE
>
> The dot in the immediately preceding line is highlighted as the
> (mistakenly classified as such) "matching" element.

Hmm... indeed it seems to be a problem in the show-paren-mode provided
by SMIE.  There's some logic to it, but to the extent that C-M-b jumps
to just before "t2", we should either highlight "t2" or just the "t" or
nothing at all.

> (2) Please enable syntax highlighting for DCGs with zero arguments.

The current code provides very minimal support for DCG, indeed.

AFAIK, the same was true of Bruda's version (after all, the current code
is Bruda's just with the new SMIE indentation swapped in and the
electric self-insert keys re-implemented via post-self-insert-hook).
If his version has evolved in the mean time, we/he should merge
the changes.

> Whereas the expected result is:
>
>    test :-
>            (   a ->
>                b
>            ;   c ->
>                HERE

This should work now.


        Stefan





reply via email to

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