From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roy Smith Newsgroups: gmane.emacs.help Subject: Re: death to tabs Date: Sat, 05 Apr 2003 08:50:08 -0500 Organization: PANIX Public Access Internet and UNIX, NYC Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1049554545 20271 80.91.224.249 (5 Apr 2003 14:55:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2003 14:55:45 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 05 16:55:43 2003 Return-path: Original-Received: from mail-relay.eunet.no ([193.71.71.242]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 191p50-0005Gd-00 for ; Sat, 05 Apr 2003 16:55:43 +0200 Original-Received: from monty-python.gnu.org (monty-python.gnu.org [199.232.76.173]) by mail-relay.eunet.no (8.12.2/8.12.2/GN) with ESMTP id h35ElsxP097617 for ; Sat, 5 Apr 2003 16:48:26 +0200 (CEST) (envelope-from help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org) Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 191oJS-0003PE-01 for gnu-help-gnu-emacs@m.gmane.org; Sat, 05 Apr 2003 09:06:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!panix!roy Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: p67-13.acedsl.com Original-X-Trace: reader2.panix.com 1049551084 11271 66.114.67.13 (5 Apr 2003 13:58:04 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Sat, 5 Apr 2003 13:58:04 +0000 (UTC) User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X) Original-Xref: shelby.stanford.edu gnu.emacs.help:111694 Original-To: help-gnu-emacs@gnu.org 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:8196 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8196 Benjamin Rutt wrote: > John Russell writes: > > > Ok, seriously, I don't ever want to see another tab as long as I > > live. I want _every__ tab I ever wrote converted to spaces right > > now and I never want to have a tab show up when I hit the TAB key > > again. All spaces all the time. > > > > I found > > (setq indent-tabs-mode nil) > > I think to set this globally, you actually want > > (setq-default indent-tabs-mode nil) > > in your ~/.emacs, since indent-tabs-mode is one of those variables > which becomes buffer-local when set in any fashion. I've had trouble getting the global default value to not be over-ridden locally in each buffer. What I do now is set it in my C mode hook: (add-hook 'c-mode-hook 'my-c-mode-hook t) (add-hook 'c++-mode-hook 'my-c-mode-hook t) (defun my-c-mode-hook () (c-set-style "linux") (line-number-mode 1) (setq indent-tabs-mode nil) (setq c-basic-offset 4)) I'm not sure if this is the "right" way to do it, but it seems to do what I want, so I'm happy.