From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: shell-script indentation bug Date: Thu, 28 Feb 2008 16:02:52 -0500 Message-ID: <87hcfsokub.fsf@stupidchicken.com> References: <200802270938.48147.andreas.roehler@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204232729 6747 80.91.229.12 (28 Feb 2008 21:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2008 21:05:29 +0000 (UTC) Cc: andreas.roehler@online.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 22:05:55 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUpwn-0008GN-1J for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 22:05:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUpwG-0000Q5-Iy for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 16:05:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUpve-0008Ms-I7 for emacs-devel@gnu.org; Thu, 28 Feb 2008 16:04:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUpvc-0008LV-TA for emacs-devel@gnu.org; Thu, 28 Feb 2008 16:04:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUpvc-0008LO-PP for emacs-devel@gnu.org; Thu, 28 Feb 2008 16:04:32 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUpvc-00067Q-KD for emacs-devel@gnu.org; Thu, 28 Feb 2008 16:04:32 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 69A474E3F9; Thu, 28 Feb 2008 16:02:52 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Wed\, 27 Feb 2008 11\:21\:26 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.91 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90777 Archived-At: Stefan Monnier writes: >> with cursor at the end of the line as shown below > >> if [ $# == 0 ]; then >> ____________________|______ > > >> C-j should indent. > > Well, I'd agree, but it's done on purpose: C-j is bound to > sh-newline-and-indent whose docstring says: > > Strip unquoted whitespace, insert newline, and indent like current line. > > Please can someone investigate which this binding was added (what was > it trying to fix), and then make it DTRT? It is present in the original version of sh-script.el, 13 years ago. I think this binding should simply be removed, and the default (newline-and-indent) used instead.