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

>    Error: (error "Bumped into unknown token")

Should be fixed now.

>            ;   % what else should
>                % we do on two lines
>                c

OK, I have a patch which does that, but note that M-; on the first line
above will move that % to comment-column (40) and at that point, we
probably don't want to align the "c" with that.  My patch works around
this problem by using as heuristic that we only align if the offset is
within prolog-indent-width.

> (c) Arguments of directives should be more indented.  For example, a
> directive whose arguments span several lines should look like this:
>
>    :- multifile
>            pred1,
>            pred2,
>            pred3.

I have no idea what "directives" are nor what the above "multifile"
means nor what is its syntax.  Does Bruda's code handle that?

> `prolog-keywords' contains the directives where a hanging indentation of
> prolog-indent-width in subsequent lines would be very welcome.

That's vague: what means "subsequent lines"?
Anything until a "."?  What about a ";" or a ":-" or a "-->"?

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

Should work now.


        Stefan





reply via email to

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