GNU bug report logs - #753
[Fwd: sh-script.el: indentation of ( )]

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: occitan@HIDDEN; Keywords: unreproducible; Done: Andrew Hyatt <ahyatt@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug closed, send any further explanations to 753 <at> debbugs.gnu.org and occitan@HIDDEN Request was from Andrew Hyatt <ahyatt@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 753 <at> debbugs.gnu.org:


Received: (at 753) by debbugs.gnu.org; 2 Jan 2016 20:56:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 02 15:56:04 2016
Received: from localhost ([127.0.0.1]:35609 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aFTDY-0006Xt-70
	for submit <at> debbugs.gnu.org; Sat, 02 Jan 2016 15:56:04 -0500
Received: from mail-qg0-f44.google.com ([209.85.192.44]:35532)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <ahyatt@HIDDEN>) id 1aFTDW-0006XO-NF
 for 753 <at> debbugs.gnu.org; Sat, 02 Jan 2016 15:56:02 -0500
Received: by mail-qg0-f44.google.com with SMTP id o11so231347171qge.2
 for <753 <at> debbugs.gnu.org>; Sat, 02 Jan 2016 12:56:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:in-reply-to:references:user-agent:date
 :message-id:mime-version:content-type;
 bh=6lvhKaMXJJR1CKSHS4SBVsILPS7dV8LNNm4G34EXq1M=;
 b=017BA/xxxmKzVxUHnVPcC+nNXb24slGawU93ZD1syOh8nxul1P/TZcLmyNhwh2wSfb
 QHPRXc6i0rp/nPgndVWlTSSPcminG8gXgqFRguaruiiSnsPuiaYDXNEjZ8pdZ5ZIHuZo
 JjQNEOiqPNl1mJqDThM4NhsBL85RUlpy8go3Rh17f9uNhdC5CygflQRsjvxrLfYyACNe
 CvaR/JRbqvcSUxr6Tvp1oEC0d2docfCU4f6shOQc4Dx+O9iZ0Xa+amzKcUG5RrWJUAh2
 wJauYjjbOvdEQaxCV3rNWh9ms4BJCFRcWh0/V6mhUZJ+tdB5h2c8vaMI1CjCkE0XAwNZ
 gelw==
X-Received: by 10.140.108.8 with SMTP id i8mr106506961qgf.24.1451768157248;
 Sat, 02 Jan 2016 12:55:57 -0800 (PST)
Received: from Andrews-MacBook-Pro.local.ahyatt-laptop
 (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199])
 by smtp.gmail.com with ESMTPSA id u45sm36934846qgd.26.2016.01.02.12.55.55
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 02 Jan 2016 12:55:55 -0800 (PST)
From: Andrew Hyatt <ahyatt@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
In-Reply-To: <fvk2nut52e.fsf@HIDDEN> (Glenn Morris's message of
 "Thu, 31 Dec 2015 21:19:05 -0500")
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
 <x5wshtt9pd.fsf@HIDDEN>
 <jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
 <szmye2grbe.fsf@HIDDEN>
 <jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
 <7f8wpl430a.fsf@HIDDEN>
 <jwvsknt9m7i.fsf-monnier+emacsbugreports@HIDDEN>
 <ahbpuhvzq3.fsf@HIDDEN>
 <jwvk594ieeg.fsf-monnier+emacsbugreports@HIDDEN> <m2r3i4ix1z.fsf@HIDDEN>
 <fvk2nut52e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin)
Date: Sat, 02 Jan 2016 15:55:32 -0500
Message-ID: <m237ufpupn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 753
Cc: 753 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Daniel Pfeiffer <occitan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


Glenn Morris <rgm@HIDDEN> writes:

> Andrew Hyatt wrote:
>
>> I can't reproduce the original bug on Emacs 25.  Can anyone reproduce
>> it?  If not, or I don't hear anything in a few weeks, I'll close this.
>
> The remaining issue was not with the original recipe, it was with the
> related stuff that was discussed later. You might like to check if any
> of it is still relevant.

There is a problem, but it seems fairly minor, and arguably not a bug -
if you use a case identifier that's also a keyword, it doesn't behave
correctly.  That has a trivial workaround - just wrap the keyword in
quotes.  I think to some extent, modes having issues with keywords
acting as identifiers or variables is pretty normal - at least hard to
fix without real semantic parsing.

I'm going to close this bug, and if anyone feels like there's still an
issue worth fixing here, please open a new bug.

Thanks for the response!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#753; Package emacs. Full text available.

Message received at 753 <at> debbugs.gnu.org:


Received: (at 753) by debbugs.gnu.org; 2 Jan 2016 01:51:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 01 20:51:52 2016
Received: from localhost ([127.0.0.1]:34120 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aFBMG-000891-2b
	for submit <at> debbugs.gnu.org; Fri, 01 Jan 2016 20:51:52 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33965)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <rgm@HIDDEN>) id 1aFBB1-00068D-5O
 for 753 <at> debbugs.gnu.org; Fri, 01 Jan 2016 20:40:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1aEpJ6-000524-U6
 for 753 <at> debbugs.gnu.org; Thu, 31 Dec 2015 21:19:09 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38846)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1aEpJ3-00051R-QT; Thu, 31 Dec 2015 21:19:05 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1aEpJ3-00074v-5T; Thu, 31 Dec 2015 21:19:05 -0500
From: Glenn Morris <rgm@HIDDEN>
To: Andrew Hyatt <ahyatt@HIDDEN>
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
 <x5wshtt9pd.fsf@HIDDEN>
 <jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
 <szmye2grbe.fsf@HIDDEN>
 <jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
 <7f8wpl430a.fsf@HIDDEN>
 <jwvsknt9m7i.fsf-monnier+emacsbugreports@HIDDEN>
 <ahbpuhvzq3.fsf@HIDDEN>
 <jwvk594ieeg.fsf-monnier+emacsbugreports@HIDDEN>
 <m2r3i4ix1z.fsf@HIDDEN>
X-Spook: weapons of mass destruction Drug war Antiviral Calderon
X-Ran: 3?wwlDHu5$vt)6`{2!wY:M[yq19?*..Q}#f=xO0`!0p_C~$5;lj)37a;{{BK,X?<S5#(NW
X-Hue: yellow
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Thu, 31 Dec 2015 21:19:05 -0500
In-Reply-To: <m2r3i4ix1z.fsf@HIDDEN> (Andrew Hyatt's message of "Tue, 29
 Dec 2015 19:45:28 -0500")
Message-ID: <fvk2nut52e.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 753
Cc: 753 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Daniel Pfeiffer <occitan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Andrew Hyatt wrote:

> I can't reproduce the original bug on Emacs 25.  Can anyone reproduce
> it?  If not, or I don't hear anything in a few weeks, I'll close this.

The remaining issue was not with the original recipe, it was with the
related stuff that was discussed later. You might like to check if any
of it is still relevant.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#753; Package emacs. Full text available.
Added tag(s) unreproducible. Request was from Andrew Hyatt <ahyatt@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 753 <at> debbugs.gnu.org:


Received: (at 753) by debbugs.gnu.org; 30 Dec 2015 00:45:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 29 19:45:38 2015
Received: from localhost ([127.0.0.1]:49101 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aE4tW-0003Ia-AN
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2015 19:45:38 -0500
Received: from mail-qg0-f45.google.com ([209.85.192.45]:34625)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <ahyatt@HIDDEN>) id 1aE4tU-0003Au-H0
 for 753 <at> debbugs.gnu.org; Tue, 29 Dec 2015 19:45:36 -0500
Received: by mail-qg0-f45.google.com with SMTP id 6so97392154qgy.1
 for <753 <at> debbugs.gnu.org>; Tue, 29 Dec 2015 16:45:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type;
 bh=d+R+s1SR+HJjUfwawVX3hIpfO7ZRwFn8oPE6SLwBkWE=;
 b=iw3jKRqvXrdCUkfLJ1a/AI4B1KxpbFnEq9tufMKXxokEKWECvAIUfQszA4OXan2RhY
 CV/4jrV3WGR6cUibMoKxyc2v+hxA3z38U830YAf0jFB4trKFoTlsO2UyJ4+D1FzxsH+a
 Q5PFbmsqzlO8S0m45AsLCdR9w0OYhNFhJpilMPBiuBl7tVdHBhg/OeDniNI2Tny1Xl9D
 HoXO2iZUwhpdmeSRMnGVhCpJ+QqCh1yPx5AUvrif7kto7IR3a734iN0jN/z9K54GVmWy
 nr1SWEl7CddVdAoxLJFaGxdTK2nTrpvDS6pFTe8BICUn/igrfwypWSrZXQF9x4ASg7ED
 LEVw==
X-Received: by 10.140.179.68 with SMTP id z65mr88327484qhz.70.1451436331099;
 Tue, 29 Dec 2015 16:45:31 -0800 (PST)
Received: from Andrews-MacBook-Pro.local.ahyatt-laptop
 (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199])
 by smtp.gmail.com with ESMTPSA id w10sm30036392qhc.16.2015.12.29.16.45.29
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 29 Dec 2015 16:45:29 -0800 (PST)
From: Andrew Hyatt <ahyatt@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
 <x5wshtt9pd.fsf@HIDDEN>
 <jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
 <szmye2grbe.fsf@HIDDEN>
 <jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
 <7f8wpl430a.fsf@HIDDEN>
 <jwvsknt9m7i.fsf-monnier+emacsbugreports@HIDDEN>
 <ahbpuhvzq3.fsf@HIDDEN>
 <jwvk594ieeg.fsf-monnier+emacsbugreports@HIDDEN>
Date: Tue, 29 Dec 2015 19:45:28 -0500
In-Reply-To: <jwvk594ieeg.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
 Monnier's message of "Fri, 09 Jan 2009 12:24:02 -0500")
Message-ID: <m2r3i4ix1z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 753
Cc: Glenn Morris <rgm@HIDDEN>, 753 <at> debbugs.gnu.org,
 Daniel Pfeiffer <occitan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


+occitan (the original reported)

Stefan Monnier <monnier@HIDDEN> writes:

>>> It doesn't matter.  "done)" is not an entity in `sh', so we should not
>>> treat it as one.
>> Yes, but it is a useful shortcut to treat it as one IMO, since it
>> gets the indentation "mostly right" for little effort.
>
> It still gets it wrong for "done )".  And it introduces bugs elsewhere.
> I'm pretty sure it was not done on purpose: it's basically a bug that
> accidentally does the right thing in some corner cases.
>
>> I'm afraid I don't know how to fix it (indentation) properly, so I
>> reopened this bug.
>
> We know how to fix the OP's bug without re-introducing the bug that my
> misguided patch tried to fix.  So we should do that and close this bug.
> Then we can open another bug about the "done )" case pattern since it's
> a different bug.
>
>
>         Stefan

I can't reproduce the original bug on Emacs 25.  Can anyone reproduce
it?  If not, or I don't hear anything in a few weeks, I'll close this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#753; Package emacs. Full text available.

Message received at 753@HIDDEN:


Received: (at 753) by emacsbugs.donarmstrong.com; 9 Jan 2009 17:24:11 +0000
From monnier@HIDDEN Fri Jan  9 09:24:11 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n09HO4kk010546
	for <753@HIDDEN>; Fri, 9 Jan 2009 09:24:05 -0800
Received: from alfajor.home (vpn-132-204-232-74.acd.umontreal.ca [132.204.232.74])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n09HO2vJ028858;
	Fri, 9 Jan 2009 12:24:02 -0500
Received: by alfajor.home (Postfix, from userid 20848)
	id 78B8F1C266; Fri,  9 Jan 2009 12:24:02 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Cc: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
Message-ID: <jwvk594ieeg.fsf-monnier+emacsbugreports@HIDDEN>
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
	<jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
	<szmye2grbe.fsf@HIDDEN>
	<jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
	<7f8wpl430a.fsf@HIDDEN>
	<jwvsknt9m7i.fsf-monnier+emacsbugreports@HIDDEN>
	<ahbpuhvzq3.fsf@HIDDEN>
Date: Fri, 09 Jan 2009 12:24:02 -0500
In-Reply-To: <ahbpuhvzq3.fsf@HIDDEN> (Glenn Morris's message of
	"Fri, 09 Jan 2009 00:02:28 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3185=0

>> It doesn't matter.  "done)" is not an entity in `sh', so we should not
>> treat it as one.
> Yes, but it is a useful shortcut to treat it as one IMO, since it
> gets the indentation "mostly right" for little effort.

It still gets it wrong for "done )".  And it introduces bugs elsewhere.
I'm pretty sure it was not done on purpose: it's basically a bug that
accidentally does the right thing in some corner cases.

> I'm afraid I don't know how to fix it (indentation) properly, so I
> reopened this bug.

We know how to fix the OP's bug without re-introducing the bug that my
misguided patch tried to fix.  So we should do that and close this bug.
Then we can open another bug about the "done )" case pattern since it's
a different bug.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.

Message received at 753@HIDDEN:


Received: (at 753) by emacsbugs.donarmstrong.com; 9 Jan 2009 05:03:50 +0000
From rgm@HIDDEN Thu Jan  8 21:03:50 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-6.0 required=4.0 tests=HAS_BUG_NUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0953hlc015619
	for <753@HIDDEN>; Thu, 8 Jan 2009 21:03:44 -0800
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1LL9Vs-0002Kb-65; Fri, 09 Jan 2009 00:02:28 -0500
From: Glenn Morris <rgm@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
	<jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
	<szmye2grbe.fsf@HIDDEN>
	<jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
	<7f8wpl430a.fsf@HIDDEN>
	<jwvsknt9m7i.fsf-monnier+emacsbugreports@HIDDEN>
X-Spook: Jyllandsposten top secret munitions USDOJ CBNRC Al-Qaeda
X-Ran: .@zj$=&Hug-1k<wFWcE|aCMF=R2iB}!A,,TxD|(6RnJb_(&:NbO9wdZEapmx5/JMmyk0Jd
X-Hue: magenta
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Fri, 09 Jan 2009 00:02:28 -0500
In-Reply-To: <jwvsknt9m7i.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Thu, 08 Jan 2009 22:58:08 -0500")
Message-ID: <ahbpuhvzq3.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Stefan Monnier wrote:

> It doesn't matter.  "done)" is not an entity in `sh', so we should not
> treat it as one.

Yes, but it is a useful shortcut to treat it as one IMO, since it
gets the indentation "mostly right" for little effort.

I'm afraid I don't know how to fix it (indentation) properly, so I
reopened this bug.

>  After all if you replace "done)" with "done )" in the above 2
> scripts, they still mean the same.




Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.
bug reopened, originator not changed. Request was from Glenn Morris <rgm@HIDDEN> to control@HIDDEN. Full text available.

Message received at 753@HIDDEN:


Received: (at 753) by emacsbugs.donarmstrong.com; 9 Jan 2009 03:58:25 +0000
From monnier@HIDDEN Thu Jan  8 19:58:25 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: **
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=2.6 required=4.0 tests=FOURLA,HAS_BUG_NUMBER,
	RCVD_IN_SBLXBL,RCVD_IN_SBLXBL_CBL,XIRONPORT autolearn=no
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n093wILM031640
	for <753@HIDDEN>; Thu, 8 Jan 2009 19:58:19 -0800
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AmcFAI9aZklFxJt//2dsb2JhbACBbM1ehXSBaQ
X-IronPort-AV: E=Sophos;i="4.37,237,1231131600"; 
   d="scan'208";a="32058014"
Received: from 69-196-155-127.dsl.teksavvy.com (HELO pastel.home) ([69.196.155.127])
  by ironport2-out.teksavvy.com with ESMTP; 08 Jan 2009 22:58:09 -0500
Received: by pastel.home (Postfix, from userid 20848)
	id B62EC86E5; Thu,  8 Jan 2009 22:58:08 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Cc: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
Message-ID: <jwvsknt9m7i.fsf-monnier+emacsbugreports@HIDDEN>
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
	<jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
	<szmye2grbe.fsf@HIDDEN>
	<jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
	<7f8wpl430a.fsf@HIDDEN>
Date: Thu, 08 Jan 2009 22:58:08 -0500
In-Reply-To: <7f8wpl430a.fsf@HIDDEN> (Glenn Morris's message of
	"Thu, 08 Jan 2009 21:39:01 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> Basically, what I saw is that it recognized "done|" as a keyword,
>> which I fixed by adding ?| to the "not in keywords" chars. By the
>> same reasonging "done)" is not a keyword, so I added ?\) (and ?\( as
>> well for good measure).

> Adding them causes the problem you are trying to avoid.

I don't follow you.

> Applying (skip-chars-forward "^ \t\n;&|")
> to "done) "
> results in "done)", which is not a recognized keyword.

So does the original code (skip-chars-forward "^ \t\n;&"), but so
doesn't my code (skip-chars-forward "^ \t\n;&|()").  In this sense my
code did make things more correct.

>> I guess that sh-get-kw should be fixed more robustly by recognizing
>> ")" and "(" but not "(done", nor "(done|toto)" for that matter. Can
>> you take care of that and make sure it fixes the problem at hand
>> without breaking the problem that prompted my misguided fix?

> It's tricky. Consider the following two examples:

> for f in 1; do
>     case $f in
>         done) echo t ;;
>     esac
> done


> (for f in 1; do
>    echo $f
> done)

> In the second one, "done)" ends a for loop, in the first one it does not.

It doesn't matter.  "done)" is not an entity in `sh', so we should not
treat it as one.  After all if you replace "done)" with "done )" in the
above 2 scripts, they still mean the same.

> Both Emacs 22.3 and the current CVS get both examples wrong, in
> different ways.

Yes, but it's a due to different bug than the one at hand, IIUC.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.

Message received at 753@HIDDEN:


Received: (at 753) by emacsbugs.donarmstrong.com; 9 Jan 2009 02:40:23 +0000
From rgm@HIDDEN Thu Jan  8 18:40:23 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-5.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n092eGjr012419
	for <753@HIDDEN>; Thu, 8 Jan 2009 18:40:17 -0800
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1LL7H3-0006s4-Ti; Thu, 08 Jan 2009 21:39:01 -0500
From: Glenn Morris <rgm@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
	<jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
	<szmye2grbe.fsf@HIDDEN>
	<jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
X-Spook: Rubin Axis of Evil cryptographic Tony Blair Ruby Ridge
X-Ran: c9_2'`q2?]D.wB,WeFtTpe}QM~WXo#jkIvk;a@x}!8+)kvc)tLK>ilO*h(4m;WH-_~A9ym
X-Hue: yellow
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Thu, 08 Jan 2009 21:39:01 -0500
In-Reply-To: <jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Thu, 08 Jan 2009 11:39:55 -0500")
Message-ID: <7f8wpl430a.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Stefan Monnier wrote:

> Basically, what I saw is that it recognized "done|" as a keyword,
> which I fixed by adding ?| to the "not in keywords" chars. By the
> same reasonging "done)" is not a keyword, so I added ?\) (and ?\( as
> well for good measure).

Adding them causes the problem you are trying to avoid.

Applying (skip-chars-forward "^ \t\n;&|")

to "done) "

results in "done)", which is not a recognized keyword.

>  I guess that sh-get-kw should be fixed more robustly by recognizing
> ")" and "(" but not "(done", nor "(done|toto)" for that matter. Can
> you take care of that and make sure it fixes the problem at hand
> without breaking the problem that prompted my misguided fix?

It's tricky. Consider the following two examples:


for f in 1; do
    case $f in
        done) echo t ;;
    esac
done


(for f in 1; do
   echo $f
done)


In the second one, "done)" ends a for loop, in the first one it does not.

Both Emacs 22.3 and the current CVS get both examples wrong, in
different ways.

ii), though valid syntax, seems ugly (and hopefully uncommon) to me,
especially considering that in Bash at least, the same problem cannot
arise with {}, since these must be isolated by whitespace.

A simple fix for i) is as follows. I don't know how to fix both i) and ii).


Did you have any other examples of shell syntax to be considered?



*** sh-script.el	5 Jan 2009 03:23:50 -0000	1.220
--- sh-script.el	9 Jan 2009 02:22:31 -0000
***************
*** 1421,1427 ****
    "Make a regexp which matches WORD as a word.
  This specifically excludes an occurrence of WORD followed by
  punctuation characters like '-'."
!   (concat word "\\([^-[:alnum:]_]\\|$\\)"))
  
  (defconst sh-re-done (sh-mkword-regexpr "done"))
  
--- 1421,1428 ----
    "Make a regexp which matches WORD as a word.
  This specifically excludes an occurrence of WORD followed by
  punctuation characters like '-'."
!   ;; ")}" excludes things like "done)" in case statements.
!   (concat word "\\([^-[:alnum:]_)}]\\|$\\)"))
  
  (defconst sh-re-done (sh-mkword-regexpr "done"))




Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.

Message received at 753@HIDDEN:


Received: (at 753) by emacsbugs.donarmstrong.com; 8 Jan 2009 16:40:06 +0000
From monnier@HIDDEN Thu Jan  8 08:40:05 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: **
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=2.5 required=4.0 tests=HAS_BUG_NUMBER,RCVD_IN_SBLXBL,
	RCVD_IN_SBLXBL_CBL,XIRONPORT autolearn=no
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n08Ge1Ie020788
	for <753@HIDDEN>; Thu, 8 Jan 2009 08:40:03 -0800
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AnQFAC+7ZUlFxJt//2dsb2JhbACBbM1UhXWBaQ
X-IronPort-AV: E=Sophos;i="4.37,235,1231131600"; 
   d="scan'208";a="32028323"
Received: from 69-196-155-127.dsl.teksavvy.com (HELO pastel.home) ([69.196.155.127])
  by ironport2-out.teksavvy.com with ESMTP; 08 Jan 2009 11:39:56 -0500
Received: by pastel.home (Postfix, from userid 20848)
	id 0291C86E5; Thu,  8 Jan 2009 11:39:56 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Cc: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
Message-ID: <jwvhc49g3li.fsf-monnier+emacsbugreports@HIDDEN>
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
	<jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
	<szmye2grbe.fsf@HIDDEN>
Date: Thu, 08 Jan 2009 11:39:55 -0500
In-Reply-To: <szmye2grbe.fsf@HIDDEN> (Glenn Morris's message of
	"Thu, 08 Jan 2009 03:00:53 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> [ You must unarchive old bugs before mailing them ]

Yes: I didn't know it was old :-(

>>> Can you remember why you added '()'?
>> Because neither ( nor ) are allowed in keywords.
> They _are_ keywords, along with { and }, as evidenced by their entries
> in the constant `sh-kw'.

Hmm... I think I see what might be the problem, tho I don't understand
the code enough.  Basically, what I saw is that it recognized "done|" as
a keyword, which I fixed by adding ?| to the "not in keywords" chars.
By the same reasonging "done)" is not a keyword, so I added ?\)
(and ?\( as well for good measure).  I guess that sh-get-kw should be
fixed more robustly by recognizing ")" and "(" but not "(done", nor
"(done|toto)" for that matter.
Can you take care of that and make sure it fixes the problem at hand
without breaking the problem that prompted my misguided fix?


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.

Message received at 753@HIDDEN:


Received: (at 753) by emacsbugs.donarmstrong.com; 8 Jan 2009 08:02:10 +0000
From rgm@HIDDEN Thu Jan  8 00:02:10 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-6.0 required=4.0 tests=HAS_BUG_NUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n08827u3018947
	for <753@HIDDEN>; Thu, 8 Jan 2009 00:02:08 -0800
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1LKpp0-0008R0-09; Thu, 08 Jan 2009 03:00:54 -0500
From: Glenn Morris <rgm@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
	<jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN>
X-Spook: cypherpunk InfoSec morse mailbomb Leuken-Baden afsatcom
X-Ran: ==|EC>M_"U$m`ipa*`Mx&3-JUU,+%/M$o^j0mC6*mD$fE}eJfs_CFJTG3=:>xQ?7%X/4b2
X-Hue: cyan
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Thu, 08 Jan 2009 03:00:53 -0500
In-Reply-To: <jwvy6xnd8rf.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Tue, 06 Jan 2009 23:47:23 -0500")
Message-ID: <szmye2grbe.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

[ You must unarchive old bugs before mailing them ]

Stefan Monnier wrote:

>> Can you remember why you added '()'?
>
> Because neither ( nor ) are allowed in keywords.

They _are_ keywords, along with { and }, as evidenced by their entries
in the constant `sh-kw'.




Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.

Message received at 753@HIDDEN:


Received: (at 753) by emacsbugs.donarmstrong.com; 8 Jan 2009 08:01:53 +0000
From rgm@HIDDEN Thu Jan  8 00:01:52 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT,
	X_DEBBUGS_NO_ACK autolearn=unavailable
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0881nGF018922
	for <753@HIDDEN>; Thu, 8 Jan 2009 00:01:50 -0800
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1LKpoi-0008Qm-NW
	for 753@HIDDEN; Thu, 08 Jan 2009 03:00:36 -0500
From: Stefan Monnier <monnier@HIDDEN>
To: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
In-Reply-To: <x5wshtt9pd.fsf@HIDDEN> (Glenn Morris's message of
	"Wed, 03 Sep 2008 13:34:22 -0400")
Date: Tue, 06 Jan 2009 23:47:23 -0500
Lines: 20
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
X-From-Line: monnier@HIDDEN  Tue Jan  6 23:46:19 2009
Received: from mail.gnu.org ([199.232.76.166]:48002 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1LKQJ9-0000ai-H3
	for rgm@HIDDEN; Tue, 06 Jan 2009 23:46:19 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1LKQKH-0003yl-U1
	for rgm@HIDDEN; Tue, 06 Jan 2009 23:47:30 -0500
Received: from ironport2-out.pppoe.ca ([206.248.154.182]:41497 helo=ironport2-out.teksavvy.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1LKQKH-0003yh-MK
	for rgm@HIDDEN; Tue, 06 Jan 2009 23:47:29 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvQEABvCY0nO+JnM/2dsb2JhbACBbM1qhXWBaQ
X-IronPort-AV: E=Sophos;i="4.37,223,1231131600"; 
   d="scan'208";a="31908751"
Received: from 206-248-153-204.dsl.teksavvy.com (HELO ceviche.home) ([206.248.153.204])
  by ironport2-out.teksavvy.com with ESMTP; 06 Jan 2009 23:47:24 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id 9F39D7020E; Tue,  6 Jan 2009 23:47:23 -0500 (EST)
X-Debbugs-No-Ack: yes
X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized.
Message-ID: <41ocyigrbv.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Glenn Morris <rgm@HIDDEN>

>> The difference seems to be caused by sh-get-kw, specifically:
>> 
>> 2006-10-10  Stefan Monnier  <monnier@HIDDEN>
>> 
>> * progmodes/sh-script.el (sh-get-kw): | is not among the allowed chars
>> for a keyword.
>> 
>> In making this change (rev 1.191), you also added '()' to the
>> non-allowed characters along with '|'. Since it wasn't documented in
>> the ChangeLog, was this a mistake?

> Ping.

> Can you remember why you added '()'?

Because neither ( nor ) are allowed in keywords.


        Stefan




Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.
bug unarchived. Request was from Glenn Morris <rgm@HIDDEN> to control@HIDDEN. Full text available.
bug archived. Request was from Debbugs Internal Request <don@HIDDEN> to internal_control@HIDDEN. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-12.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 753-done) by emacsbugs.donarmstrong.com; 6 Sep 2008 19:01:07 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86J13RZ007587
	for <753-done@HIDDEN>; Sat, 6 Sep 2008 12:01:05 -0700
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1Kc30C-0007EU-LP; Sat, 06 Sep 2008 14:59:20 -0400
From: Glenn Morris <rgm@HIDDEN>
To: 753-done <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
	<x5wshtt9pd.fsf@HIDDEN>
X-Spook: Mole ASPIC weapons of mass destruction Glock quiche
X-Ran: ~\17&*}JMm8eV^?JQmq[(o5ik=:vux'SK;G5[UARv0q"]}?=r(OhAz]m>e'xbJHj@HIDDEN\2
X-Hue: cyan
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Sat, 06 Sep 2008 14:59:20 -0400
In-Reply-To: <x5wshtt9pd.fsf@HIDDEN> (Glenn Morris's message of
	"Wed, 03 Sep 2008 13:34:22 -0400")
Message-ID: <eqr67xumlz.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

2008-09-06  Glenn Morris  <rgm@HIDDEN>

    * progmodes/sh-script.el (sh-get-kw): Remove '()' from the list of
      unallowed characters; added 2006-10-10 without comment.  (Bug#753)




Notification sent to occitan@HIDDEN:
bug acknowledged by developer. Full text available.
Reply sent to Glenn Morris <rgm@HIDDEN>:
You have taken responsibility. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-12.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 753) by emacsbugs.donarmstrong.com; 3 Sep 2008 17:36:07 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83Ha146007981
	for <753@HIDDEN>; Wed, 3 Sep 2008 10:36:02 -0700
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1KawFK-00088U-BN; Wed, 03 Sep 2008 13:34:22 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: 753 <at> debbugs.gnu.org
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN> <cyfxowy4hb.fsf@HIDDEN>
X-Spook: UNSCOM Mahmoud Ahmadinejad Aldergrove Operation Iraqi
X-Ran: 6MYK:xC$CRim#])f8_oi_03i_=mnIZ=pUF\Pr@s\G|%':~#+B}`</ZeV1BAb*3Scnt2%lD
X-Hue: red
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Wed, 03 Sep 2008 13:34:22 -0400
In-Reply-To: <cyfxowy4hb.fsf@HIDDEN> (Glenn Morris's message of
	"Fri, 22 Aug 2008 20:12:00 -0400")
Message-ID: <x5wshtt9pd.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Glenn Morris wrote:

> The difference seems to be caused by sh-get-kw, specifically:
>
> 2006-10-10  Stefan Monnier  <monnier@HIDDEN>
>
>     * progmodes/sh-script.el (sh-get-kw): | is not among the allowed chars
>     for a keyword.
>
> In making this change (rev 1.191), you also added '()' to the
> non-allowed characters along with '|'. Since it wasn't documented in
> the ChangeLog, was this a mistake?

Ping.

Can you remember why you added '()'?

Here's why the '|' got added:

http://lists.gnu.org/archive/html/emacs-pretest-bug/2006-10/msg00160.html




Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-11.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 753) by emacsbugs.donarmstrong.com; 23 Aug 2008 00:13:32 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7N0DTnR020827
	for <753@HIDDEN>; Fri, 22 Aug 2008 17:13:30 -0700
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1KWgjY-0003SE-VZ; Fri, 22 Aug 2008 20:12:00 -0400
From: Glenn Morris <rgm@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#753: [Fwd: sh-script.el: indentation of ( )]
References: <48AC8E68.8080503@HIDDEN>
to: 753@HIDDEN
X-Spook: e-cash Mantis BLU-97 A/B SSL InfoSec Watergate Armani Agfa
X-Ran: *2GL?o~8V:1.KuRtt&QUF29g6NKx0Up>Q#tr|`O'J-3kt%kMfA(u;<~Px?bNM>uX;9/Hf5
X-Hue: black
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Fri, 22 Aug 2008 20:12:00 -0400
In-Reply-To: <48AC8E68.8080503@HIDDEN> (Daniel Pfeiffer's message of
	"Wed, 20 Aug 2008 23:36:40 +0200")
Message-ID: <cyfxowy4hb.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Daniel Pfeiffer wrote:

> What indent-region on the entire buffer yields:
>
> 	#!/bin/sh
> 	
> 	(
> 	    true
> 	    )
> 	{
> 	    true
> 	}


Emacs 21.4 gets it right here, whereas 22.1 and later gets it wrong.

The difference seems to be caused by sh-get-kw, specifically:

2006-10-10  Stefan Monnier  <monnier@HIDDEN>

    * progmodes/sh-script.el (sh-get-kw): | is not among the allowed chars
    for a keyword.

In making this change (rev 1.191), you also added '()' to the
non-allowed characters along with '|'. Since it wasn't documented in
the ChangeLog, was this a mistake?




Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-3.5 required=4.0 tests=BAYES_00,HTML_MESSAGE,
	RCVD_IN_DNSWL_LOW autolearn=no version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 20 Aug 2008 21:37:00 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7KLatPK021873
	for <submit@HIDDEN>; Wed, 20 Aug 2008 14:36:57 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KVvMN-0001y6-DB
	for bug-gnu-emacs@HIDDEN; Wed, 20 Aug 2008 17:36:55 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KVvMM-0001xu-O7
	for bug-gnu-emacs@HIDDEN; Wed, 20 Aug 2008 17:36:55 -0400
Received: from [199.232.76.173] (port=56602 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KVvMM-0001xr-IJ
	for bug-gnu-emacs@HIDDEN; Wed, 20 Aug 2008 17:36:54 -0400
Received: from mailout05.t-online.de ([194.25.134.82]:41440)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <occitan@HIDDEN>)
	id 1KVvML-0001Dn-Tw
	for bug-gnu-emacs@HIDDEN; Wed, 20 Aug 2008 17:36:54 -0400
Received: from fwd25.aul.t-online.de 
	by mailout05.sul.t-online.de with smtp 
	id 1KVvMI-0005Nq-01; Wed, 20 Aug 2008 23:36:50 +0200
Received: from [192.168.0.162] (VyvTomZDrh5gChjk8DZVPu0C7aphC-Zn6AsccONGLTp9ex4wnXJ-Xk-NDtFv8H6g1I@[91.35.210.35]) by fwd25.aul.t-online.de
	with esmtp id 1KVvMD-0LeBiS0; Wed, 20 Aug 2008 23:36:45 +0200
Message-ID: <48AC8E68.8080503@HIDDEN>
Date: Wed, 20 Aug 2008 23:36:40 +0200
From: Daniel Pfeiffer <occitan@HIDDEN>
Reply-To: occitan@HIDDEN
User-Agent: Thunderbird 2.0.0.16 (X11/20080724)
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
CC: Darren Stuart Embry <dse@HIDDEN>
Subject: [Fwd: sh-script.el: indentation of ( )]
Content-Type: multipart/alternative;
 boundary="------------070605070605080903090106"
X-ID: VyvTomZDrh5gChjk8DZVPu0C7aphC-Zn6AsccONGLTp9ex4wnXJ-Xk-NDtFv8H6g1I
X-TOI-MSGID: 6604c84a-1d18-4e7c-95c4-a914ee2407e1
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)

This is a multi-part message in MIME format.
--------------070605070605080903090106
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

since I abandoned Shell in favour of Perl, over to you maintainers:

-------- Original-Nachricht --------
Betreff: 	sh-script.el: indentation of ( )
Datum: 	Wed, 20 Aug 2008 12:12:12 -0400
Von: 	Darren Stuart Embry <dse@HIDDEN>
An: 	Daniel Pfeiffer <occitan@HIDDEN>



Hello,

I'd like to report an issue regarding indentation of compound commands
surrounded with parenthesis.

Desired indentation:

	#!/bin/sh

	(
	    true
	)
	{
	    true
	}

What indent-region on the entire buffer yields:

	#!/bin/sh
	
	(
	    true
	    )
	{
	    true
	}

Note that the same behavior does not happen with the { } pair.

You have any idea why this is happening and/or how to fix this?

Version of emacs:
	GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll
	bars) of 2008-04-27 on raven, modified by Debian

Version of sh-script.el:
	;; Author: Daniel Pfeiffer <occitan@HIDDEN>
	;; Version: 2.0f

Thanks in advance.

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in email?



coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / lär dig / ucz się    Esperanto:
                    http://lernu.net  /  http://ikurso.net


--------------070605070605080903090106
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
since I abandoned Shell in favour of Perl, over to you maintainers:<br>
<br>
-------- Original-Nachricht --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
 cellspacing="0">
  <tbody>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Betreff: </th>
      <td>sh-script.el: indentation of ( )</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Datum: </th>
      <td>Wed, 20 Aug 2008 12:12:12 -0400</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Von: </th>
      <td>Darren Stuart Embry <a class="moz-txt-link-rfc2396E" href="mailto:dse@HIDDEN">&lt;dse@HIDDEN&gt;</a></td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">An: </th>
      <td>Daniel Pfeiffer <a class="moz-txt-link-rfc2396E" href="mailto:occitan@HIDDEN">&lt;occitan@HIDDEN&gt;</a></td>
    </tr>
  </tbody>
</table>
<br>
<br>
<pre>Hello,

I'd like to report an issue regarding indentation of compound commands
surrounded with parenthesis.

Desired indentation:

	#!/bin/sh

	(
	    true
	)
	{
	    true
	}

What indent-region on the entire buffer yields:

	#!/bin/sh
	
	(
	    true
	    )
	{
	    true
	}

Note that the same behavior does not happen with the { } pair.

You have any idea why this is happening and/or how to fix this?

Version of emacs:
	GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll
	bars) of 2008-04-27 on raven, modified by Debian

Version of sh-script.el:
	;; Author: Daniel Pfeiffer <a class="moz-txt-link-rfc2396E" href="mailto:occitan@HIDDEN">&lt;occitan@HIDDEN&gt;</a>
	;; Version: 2.0f

Thanks in advance.

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in email?

</pre>
<br>
<pre class="moz-signature" cols="78">coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / lär dig / ucz się    Esperanto:
                    <a class="moz-txt-link-freetext" href="http://lernu.net">http://lernu.net</a>  /  <a class="moz-txt-link-freetext" href="http://ikurso.net">http://ikurso.net</a></pre>
</body>
</html>

--------------070605070605080903090106--





Acknowledgement sent to occitan@HIDDEN:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#753; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.