From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: despen@verizon.net Newsgroups: gmane.emacs.help Subject: Re: [emacs] tabs, spaces, and indentation Date: Wed, 06 Oct 2010 18:05:06 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291868859 8066 80.91.229.12 (9 Dec 2010 04:27:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 04:27:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 05:27:35 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 1PQY6P-0001rw-4C for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 05:27:33 +0100 Original-Received: from localhost ([127.0.0.1]:55364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQY6O-0001PL-Do for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 23:27:32 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news.wiretrip.org!news2.arglkargh.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Injection-Date: Wed, 6 Oct 2010 22:05:06 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="m5Xp1AeG0rhUixp3PGRKOA"; logging-data="25796"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/o9/gjtTzaYrdc6dfEVlBwUtMVmxJl8bg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:v95yyqNW+P5Epc38a7vC72/bgDA= sha1:dzSa8olvVsG3LlxMg9dpIpChhHU= Original-Xref: usenet.stanford.edu gnu.emacs.help:181663 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:76641 Archived-At: Nerius Landys writes: > Hi. I use emacs all the time for programming and shell scripting. Now > I'm dabbling in an open source project that is written in C, and the > entire code base uses tabs extensively (instead of spaces for > indentation). I very much prefer to use spaces for indentation; however I > must use tabs for this project in order to make the code consistent. I am > looking for some quick command or something that will place my emacs into > a special mode that is suitable for working with tabbed C code. Then of > course I'd like a command that puts me back into the regular settings that > I have and am used to. (In other words, a toggle on and off.) > > Here are some details. > > I am running FreeBSD 8.0 and I have emacs installed with no X11, from the > port editors/emacs-nox11. The version of emacs is 23.2_4,2. I have no > additional bells and whistles installed for emacs other than what comes > with this FreeBSD port and my .emacs config, which is more or less like > so: > > (setq transient-mark-mode t) > (setq make-backup-files nil) > ;(setq-default indent-tabs-mode nil) [ commented out ] > (setq-default c-basic-offset 2) > > I tried searching on Google for commands that may help me, but most of > what I found explained how to enable the kind of behavior that I'm NOT > looking (I'm going in the opposite direction unfortunately). Check here: http://www.mail-archive.com/fvwm-workers@lists.math.uh.edu/msg08136.html