From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sergei Organov Newsgroups: gmane.emacs.help Subject: Re: No automatic tabs in Emacs? Date: Fri, 03 Dec 2010 15:10:40 +0300 Message-ID: <87zksn83b3.fsf@osv.gnss.ru> References: <4CF554E6.4090009@interia.pl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291398582 12332 80.91.229.12 (3 Dec 2010 17:49:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Dec 2010 17:49:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Sueroski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 03 18:49:37 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1POZlI-0001t5-4k for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Dec 2010 18:49:36 +0100 Original-Received: from localhost ([127.0.0.1]:48913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POZlH-0002ke-Hz for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Dec 2010 12:49:35 -0500 Original-Received: from [140.186.70.92] (port=40262 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POUTN-0004s8-1t for help-gnu-emacs@gnu.org; Fri, 03 Dec 2010 07:10:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POUTL-0004lZ-Lt for help-gnu-emacs@gnu.org; Fri, 03 Dec 2010 07:10:44 -0500 Original-Received: from javad.com ([205.178.136.214]:45496 helo=02aef2d.netsolvps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POUTL-0004l8-I8 for help-gnu-emacs@gnu.org; Fri, 03 Dec 2010 07:10:43 -0500 Original-Received: (qmail 7786 invoked from network); 3 Dec 2010 12:10:42 +0000 Original-Received: from unknown (HELO osv.gnss.ru) (89.175.180.246) by javad.com with (AES256-SHA encrypted) SMTP; 3 Dec 2010 12:10:42 +0000 Original-Received: from osv by osv.gnss.ru with local (Exim 4.72) (envelope-from ) id 1POUTI-0005ZK-Rb; Fri, 03 Dec 2010 15:10:40 +0300 In-Reply-To: <4CF554E6.4090009@interia.pl> (sueroski@interia.pl's message of "Tue, 30 Nov 2010 20:47:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 03 Dec 2010 12:48:17 -0500 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:75496 Archived-At: Sueroski writes: [...] > If you don't know what I mean under term "auto tab" then watch: > for example: > I'm writing on C my code: > > #include "stdio.h" > int main(){ > } > > And I wanna add something to main. I push Enter and write my code. In > Emacs I get this: > > #include "stdio.h" > int main(){ > printf("Hello World"); > } > > And I wanna get by default without pressing TAB, get this: > > #include "stdio.h" > int main(){ > printf("Hello World"); > } Add (define-key global-map (kbd "RET") 'newline-and-indent) to you .emacs, and restart emacs. -- Sergei.