From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.help Subject: Re: indentation - always a pita Date: Thu, 26 Jun 2003 11:21:24 -0700 Organization: Still searching... Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <847k7afzu4.fsf@lucy.is.informatik.uni-duisburg.de> <844r2exepk.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056659585 3832 80.91.224.249 (26 Jun 2003 20:33:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2003 20:33:05 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 26 22:33:04 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 19VdQD-0000xy-00 for ; Thu, 26 Jun 2003 22:32:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VdPA-0008Cm-8z for gnu-help-gnu-emacs@m.gmane.org; Thu, 26 Jun 2003 16:31:40 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19VbvY-0007y5-MV for help-gnu-emacs@gnu.org; Thu, 26 Jun 2003 14:57:00 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Vbv9-0007oQ-TW for help-gnu-emacs@gnu.org; Thu, 26 Jun 2003 14:56:36 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VbNt-0007vI-93 for help-gnu-emacs@gnu.org; Thu, 26 Jun 2003 14:22:13 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19VbNY-0005ah-00 for ; Thu, 26 Jun 2003 20:21:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19VbMp-0005Vv-00 for ; Thu, 26 Jun 2003 20:21:07 +0200 Original-Lines: 49 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:BZhmXG9CANk7mTu6mDYfYWTAZ78= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11256 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11256 Jens Schmidt writes: > Try `sh-basic-offset' instead. That's what I use. I tried to > format your example with the following result: Yeah, now we're talking. combine this with Kai's suggestion (setq-default indent-tabs-mode nil) Gets rid of tabs (setq sh-basic-offset 2) Gets rid of the radical indentation. Even the deepest offset is 16 spc instead of 24. I think this is a more sensible setup. But of course haven't tested it thoroughly. Think I might try submitting a bug report to the maintainers and see if there is a good reason why the default is so radical. PS- The example sh code I posted as legitamate format was actually ridled with syntax errors. Here is a better example: if [ ];then if [ ];then case $option t)cmd if[];then cmd fi ;; h)cmd if[];then case $otheroption a) cmd if[];then cmd fi ;; b) cmd ;; esac ;; esac fi if[];then cmd fi fi fi