From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Malte Spiess Newsgroups: gmane.emacs.help Subject: Re: Indentation. Date: Fri, 27 Oct 2006 20:01:29 +0200 Organization: Arcor Message-ID: <877iyl4ozq.fsf@trick.ulm.malte.spiess> References: <1161965861.676823.127500@i3g2000cwc.googlegroups.com> <87ac3hiu58.fsf@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161975268 15188 80.91.229.2 (27 Oct 2006 18:54:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Oct 2006 18:54:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 27 20:54:28 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GdWdX-0000is-B7 for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Oct 2006 20:40:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GdWdW-0008MW-TW for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Oct 2006 14:40:58 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:bdvHbImkLxnEWDBE6QDi6NxM6Nw= Original-Lines: 35 Original-NNTP-Posting-Date: 27 Oct 2006 20:00:58 CEST Original-NNTP-Posting-Host: 646fd701.newsspool4.arcor-online.net Original-X-Trace: DXC==HL5S9ii?WU1`E>oC; JXEZ4IUK[j3_[jQd8?gVMU; ]Z>^nRFEUi2V8YS Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: shelby.stanford.edu gnu.emacs.help:142715 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38334 Archived-At: Markus Triska writes: > zombek@gmail.com writes: > >> 1) 4 space indentation (no mather which language) and it shouldn't care >> about the syntax - when I say indent then indent > > Add this to the modes in which you want 4 spaces when you press TAB: > > (local-set-key "\t" (lambda () (interactive) (insert " "))) I have to say that I don't think that this is a very good idea since every other function that has to do with indentation will ruin your setup. (indent-region,...) You should stick to what Sam has recommended and maybe think your intend over. I guess that there are some modes in which an indentation of 4 is really not a good idea, like LaTeX mode or html stuff (ymmv). Plus I don't think that this is a easy to accomplish feature. I would recommend a more precise setup for each mode. The modes for c-like-languages can be changed all in one step. >> 2)when I press RETURN when beeing on some indentation level i should >> automatically go to the same indentation level in the new line without >> the need to press TAB > > (global-set-key "\C-m" 'newline-and-indent) This can be a good idea anyway. But keep in mind that C-j already does this. Greetings Malte