GNU bug report logs -
#21526
24.5; prolog-mode: broken indentation for if-then-else construct
Previous Next
Reported by: Markus Triska <triska <at> metalevel.at>
Date: Sun, 20 Sep 2015 16:21:01 UTC
Severity: minor
Found in version 24.5
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #128 received at 21526 <at> debbugs.gnu.org (full text, mbox):
> serious_predicate :-
> goal_1,
> goal_2,
> something_complicated,
> something_complicated :-
> goal_3,
> goal_4.
> But this is not valid Prolog syntax,
Exactly. We could try and coerce Prolog into interpreting it the way
you suggest, but I think we're better off telling people to add
a terminating "." in the previous rule, even that rule is not yet finished.
> Therefore, the above program is not syntactically valid, and it should
> be treated for what it actually is: Two independent rules, with one of
> them still unfinished, and only the second one mattering for indentation
> in this situation, which previously also worked exactly this way.
There's no way to know that this is "what it actually is".
And even if it is, the mis-indentation can be useful, in case the user
didn't realize that she forgot to close the previous rule.
IOW, in this particular case, the ideal behavior depends on what's
inside the user's head, so I don't think we should spend much time
trying to fit any particular expected state of mind of the user.
Stefan
This bug report was last modified 4 years and 269 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.