From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct Date: Wed, 21 Oct 2015 12:06:53 -0400 Message-ID: References: <8737xwbeo0.fsf@metalevel.at> <87a8rw27vh.fsf@metalevel.at> <87egh8rlnn.fsf@metalevel.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445443656 5670 80.91.229.3 (21 Oct 2015 16:07:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Oct 2015 16:07:36 +0000 (UTC) Cc: 21526@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 21 18:07:20 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zovv3-0006Pj-T8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Oct 2015 18:07:18 +0200 Original-Received: from localhost ([::1]:52497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zovuz-0000Ah-Cg for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Oct 2015 12:07:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zovus-00009l-8o for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2015 12:07:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zovup-0004nM-3i for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2015 12:07:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zovuo-0004nI-W2 for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2015 12:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zovuo-0003fN-HK for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2015 12:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Oct 2015 16:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21526 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21526-submit@debbugs.gnu.org id=B21526.144544361614080 (code B ref 21526); Wed, 21 Oct 2015 16:07:02 +0000 Original-Received: (at 21526) by debbugs.gnu.org; 21 Oct 2015 16:06:56 +0000 Original-Received: from localhost ([127.0.0.1]:59592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zovuh-0003f2-V3 for submit@debbugs.gnu.org; Wed, 21 Oct 2015 12:06:56 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:65387) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zovug-0003eu-87 for 21526@debbugs.gnu.org; Wed, 21 Oct 2015 12:06:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsEwA731xV/zCdWxdcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FtQQjgWaCLiKCeAEBAQ X-IPAS-Result: A0AsEwA731xV/zCdWxdcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FtQQjgWaCLiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="170517412" Original-Received: from 23-91-157-48.cpe.pppoe.ca (HELO pastel.home) ([23.91.157.48]) by ironport2-out.teksavvy.com with ESMTP; 21 Oct 2015 12:06:53 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 43B69628FF; Wed, 21 Oct 2015 12:06:53 -0400 (EDT) In-Reply-To: (Markus Triska's message of "Wed, 21 Oct 2015 01:47:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107806 Archived-At: > 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