From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: indenting Date: Tue, 26 Oct 2004 20:35:41 GMT Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098823053 19496 80.91.229.6 (26 Oct 2004 20:37:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Oct 2004 20:37:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 26 22:37:28 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CMY4O-0002Ig-00 for ; Tue, 26 Oct 2004 22:37:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMYC5-0007Yk-Nx for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Oct 2004 16:45:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:oqqmo5Fu+yyyZXYg0k2dhSPMtAw= Original-Lines: 55 Original-NNTP-Posting-Host: 132.204.24.84 Original-X-Complaints-To: abuse@umontreal.ca Original-X-Trace: charlie.risq.qc.ca 1098822941 132.204.24.84 (Tue, 26 Oct 2004 16:35:41 EDT) Original-NNTP-Posting-Date: Tue, 26 Oct 2004 16:35:41 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:126092 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21470 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21470 >>>>> "Billy" == Billy N Patton writes: > Stefan Monnier wrote: >>> I do not want tab characters. >> Your (setq-default indent-tabs-mode nil) does that. >> >>> I want to be able to hit the tab key after I type int and i1. but the int >>> indents and follows the tab. What I end up with is >>> int i1 = 0; >>> THis is no more readable than having everything shifted to the left. >>> How can I stop this behavior? >> Your (setq c-tab-always-indent nil) should have done that. Can you >> describe >> very pedantically precisely every little itsy bitsy detail of what you do, >> what you expect, and what happens instead, as if you were talking to >> a complete and total idiot ? > I want to type: > inti1= 0; > char*a_pointer = null; > to end with > int i = 0; > char* a_pointer = null; > but what I get now is: > int i = 0; > char* a_pointer = null; I understand this part, but you left out tons of details, like:\ - how do you start Emacs? - what version of Emacs? - what buffer do you type this in (file name? how do you open it?)? - what is the major mode of that buffer (C-h m tells you)? - what's the value of c-tab-always-indent in that buffer? ... When I do: % emacs-21.2 -q --no-site-file --eval '(setq c-tab-always-indent nil)' ~/tmp/foo.c inti1= 0; I get a line like: int i1 = 0; which seems pretty close to what you want (except you'll probably want to hit TAB a bit less often). I suspect that your (setq c-tab-always-indent nil) is not executed (because of an error earlier in your .emacs) or it is overruled by something. Stefan