From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct Date: Tue, 06 Oct 2015 00:38:49 +0200 Message-ID: <87zizxrldy.fsf@metalevel.at> References: <87y4fo9zt6.fsf@metalevel.at> <87vbarwy9v.fsf@metalevel.at> <87bncjbpz4.fsf@metalevel.at> <87mvw3cdmf.fsf@metalevel.at> <87y4fltf2a.fsf@metalevel.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444084761 9765 80.91.229.3 (5 Oct 2015 22:39:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Oct 2015 22:39:21 +0000 (UTC) Cc: 21526@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 06 00:39:13 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 1ZjEPW-0006P8-4u for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Oct 2015 00:39:10 +0200 Original-Received: from localhost ([::1]:48031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjEPV-0007He-1Z for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Oct 2015 18:39:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjEPS-0007HU-9O for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 18:39:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjEPP-0004QZ-2U for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 18:39:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjEPO-0004QV-Vl for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 18:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZjEPO-0004mI-Lb for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 18:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Oct 2015 22:39: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.144408473318349 (code B ref 21526); Mon, 05 Oct 2015 22:39:02 +0000 Original-Received: (at 21526) by debbugs.gnu.org; 5 Oct 2015 22:38:53 +0000 Original-Received: from localhost ([127.0.0.1]:55547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjEPF-0004ls-2Z for submit@debbugs.gnu.org; Mon, 05 Oct 2015 18:38:53 -0400 Original-Received: from static.59.150.47.78.clients.your-server.de ([78.47.150.59]:56003 helo=metalevel.at) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjEPC-0004lk-Ov for 21526@debbugs.gnu.org; Mon, 05 Oct 2015 18:38:51 -0400 Original-Received: by metalevel.at (Postfix, from userid 1000) id 0E042EC103; Tue, 6 Oct 2015 00:38:49 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Fri, 02 Oct 2015 16:47:30 -0400") 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:107338 Archived-At: Stefan Monnier writes: > Looks good, installed, thanks. Great! One further devation from Stefan Bruda's mode is: test :- X = [ a, b ]. We expect instead, as with Stefan Bruda's version, the layout: test :- X = [ a, b ]. Notice that this regression is very visible, since it affects the module declaration that most Prolog files begin with. For example, consider: :- module(x, [ a, bHERE when I, with point at "HERE", press RET, then I get with Emacs git: :- module(x, [ a, b HERE The indentation for this new line is already different from Stefan Bruda's version, but not in itself a serious mistake at that point: It is theoretically possible that further list elements still follow. In practice though, that is extremely unlikely, and we would therefore prefer the level of the opening "[" (as with Stefan Bruda's version): :- module(x, [ a, b HERE However, suppose you retain the current behaviour of Emacs git, and then close the whole module declaration by entering "]).", yielding: :- module(x, [ a, b ]).HERE Then, if you press RET (as most users certainly would here), you get: :- module(x, [ a, b ]). and this is clearly not the intended layout for a term like that. Instead, the indentation level of "[" should equal that of "]". Another deviation from Stefan Bruda's mode is an unusually large indentation for arguments of declarations like: :- public a, b. Please consider indenting arguments less, for example, as in: :- public a, b. Thank you and all the best, Markus