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#17620: sh-mode indentation of continued do loop lists Date: Wed, 28 May 2014 22:23:50 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401330270 14853 80.91.229.3 (29 May 2014 02:24:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 May 2014 02:24:30 +0000 (UTC) Cc: 17620@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 29 04:24:22 2014 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 1Wpq0y-0000g3-Is for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 May 2014 04:24:20 +0200 Original-Received: from localhost ([::1]:45812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpq0y-0002Ex-55 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 22:24:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpq0o-0002Er-95 for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 22:24:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wpq0g-00065R-Q4 for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 22:24:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpq0g-00065N-NI for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 22:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wpq0g-00086Q-2R for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 22:24: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: Thu, 29 May 2014 02:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17620 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17620-submit@debbugs.gnu.org id=B17620.140133024031138 (code B ref 17620); Thu, 29 May 2014 02:24:02 +0000 Original-Received: (at 17620) by debbugs.gnu.org; 29 May 2014 02:24:00 +0000 Original-Received: from localhost ([127.0.0.1]:34999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpq0e-00086A-19 for submit@debbugs.gnu.org; Wed, 28 May 2014 22:24:00 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50388) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpq0a-00085l-TS for 17620@debbugs.gnu.org; Wed, 28 May 2014 22:23:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd/fU/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IPAS-Result: ArUGAIDvNVNLd/fU/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="64920202" Original-Received: from 75-119-247-212.dsl.teksavvy.com (HELO pastel.home) ([75.119.247.212]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 May 2014 22:23:51 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B7547601CB; Wed, 28 May 2014 22:23:50 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Wed, 28 May 2014 17:26:19 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.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: 140.186.70.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:89654 Archived-At: > In 24.3.91, the continued line gets way too much indentation: > for foo in a \ > b; do > echo $foo > done I think this requires a config variable: - The indentation you show above is the one that makes sense to me, where the \ is just a way to write "a b" on multiple logical lines, like you can do in most free-form programming languages, in which case "b", being an argument to "a", should be indented a bit deeper than "a". I.e. the indentation rule pretends the \ don't really exist. - The indentation you ask for seems to be based on the idea that "\" is a way to split a single logical line into several physical lines, doing a kind of manual "word wrap". IOW the first view would want for f in a; do \ for g in b; do \ echo toto; \ done; \ done [ tho I see now that the current code fails here (probably because it doesn't understand that the "do"s are "hanging"). ] whereas the second view would want for f in a; do \ for g in b; do \ echo toto; \ done; \ done I don't see a way to reconcile those two views, hence the need for a config variable to choose between those two schools. Stefan