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, 22 Sep 2015 08:25:13 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442903184 17864 80.91.229.3 (22 Sep 2015 06:26:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Sep 2015 06:26:24 +0000 (UTC) To: 21526@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 22 08:26:12 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 1ZeH1n-0004D1-AP for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Sep 2015 08:26:11 +0200 Original-Received: from localhost ([::1]:36920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeH1m-0001Gp-NP for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Sep 2015 02:26:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeH1i-0001Ge-S8 for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 02:26:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeH1f-0008C9-O0 for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 02:26:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeH1f-0008BE-LZ for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 02:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZeH1e-00031J-Gg for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 02:26:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Sep 2015 06:26: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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144290313511538 (code B ref -1); Tue, 22 Sep 2015 06:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Sep 2015 06:25:35 +0000 Original-Received: from localhost ([127.0.0.1]:41141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZeH1B-0002zy-D8 for submit@debbugs.gnu.org; Tue, 22 Sep 2015 02:25:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42022) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZeH17-0002zk-9Z for submit@debbugs.gnu.org; Tue, 22 Sep 2015 02:25:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeH16-0007op-3J for submit@debbugs.gnu.org; Tue, 22 Sep 2015 02:25:29 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:58955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeH15-0007oT-V4 for submit@debbugs.gnu.org; Tue, 22 Sep 2015 02:25:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeH14-0001AH-Sw for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 02:25:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeH11-0007hv-PU for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 02:25:26 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:57497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeH11-0007gq-KB for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 02:25:23 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZeH0z-00039a-Ka for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 08:25:21 +0200 Original-Received: from 178.115.130.63.wireless.dyn.drei.com ([178.115.130.63]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Sep 2015 08:25:21 +0200 Original-Received: from triska by 178.115.130.63.wireless.dyn.drei.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Sep 2015 08:25:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 178.115.130.63.wireless.dyn.drei.com Cancel-Lock: sha1:gczusj1NjL1itllPfihTKHYViOM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:106797 Archived-At: Stefan Monnier writes: >> When I try it with your patch, it fails to indent subsequent lines. > > Ugh! That should be fixed now (see patch below). Great, thank you! > Right. This one requires thinking (but will benefit other modes as > well). This will make the new mode much more useable, so thank you for looking into this! Currently, not only is the new empty line indented in a distracting and unexpected way, but closing the bock does not indent it as expected either. For example, when I press RET at: test :- ( a ; bHERE then I get: test :- ( a ; b HERE and when I then press ")" followed by "." to end the block, I get: test :- ( a ; b ). Previously you suggested to make "." electric, this would fix this, however, I expect the correct indentation already when pressing ")": test :- ( a ; b ) because the block need not end with "." but can look for example like: test :- ( a ; b ), c. I hope this helps. All the best, Markus