From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: Shell-script mode indentation not hip to && and probably || too Date: Thu, 06 Mar 2003 09:27:00 -0700 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E6776D4.5060901@ihs.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1046968559 14789 80.91.224.249 (6 Mar 2003 16:35:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2003 16:35:59 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 06 17:35:58 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18qyLW-0003pO-00 for ; Thu, 06 Mar 2003 17:35:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qyLb-0002Vw-06 for gnu-bug-gnu-emacs@m.gmane.org; Thu, 06 Mar 2003 11:35:55 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18qyHl-0000sX-00 for bug-gnu-emacs@prep.ai.mit.edu; Thu, 06 Mar 2003 11:31:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18qyH9-0000b2-00 for bug-gnu-emacs@prep.ai.mit.edu; Thu, 06 Mar 2003 11:31:20 -0500 Original-Received: from ashd1-1.relay.mail.uu.net ([199.171.54.245]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qyDq-0007t6-00 for bug-gnu-emacs@prep.ai.mit.edu; Thu, 06 Mar 2003 11:27:54 -0500 Original-Received: from mail.fu-berlin.de by mr0.ash.ops.us.uu.net with ESMTP (peer crosschecked as: mail.fu-berlin.de [160.45.11.165]) id QQoewf10896 for ; Thu, 6 Mar 2003 16:27:52 GMT Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Thu, 6 Mar 2003 17:26:53 +0100 (MET) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Thu, 6 Mar 2003 17:26:52 +0100 (MET) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 26 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: fu-berlin.de 1046968012 63557559 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4572 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4572 Dan Jacobson wrote: > Well, there I was typing away in Shell-script[sh] mode, hitting tab > all the while to ensure proper indentation, when all the sudden, I > noticed that the lines after a && were not more indented, like it was > no big deal. > { > for i in ${@?} > do > grep -i \\b$i\\b /usr/share/edict/enamdict && > at_least_one_found=1 && > echo ===== > done > } > $T.1 > IMHO they should not be further indented, because the commands that make up a compound command (joined by "&&" or "||") are at the same syntactic/structural level (just like commands that form a pipeline joined by "|"). The thing that looks wrong to me above is that "do" is indented further than "for ..." and "done". -- Kevin Rodgers