[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: |
Wed, 21 Oct 2015 12:06:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> 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
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, (continued)
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/10/08
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/10/08
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/10/08
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/10/08
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/10/08
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/10/08
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/10/08
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/10/20
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct,
Stefan Monnier <=
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/10/21
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/10/21
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/10/22
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/10/25
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/10/08