From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: replace TAB with 8 whitespaces Date: Mon, 16 Jun 2003 15:17:35 +0200 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84r85uf9g0.fsf@lucy.is.informatik.uni-duisburg.de> References: <848ys67985.fsf@lucy.is.informatik.uni-duisburg.de> <84r85ufpos.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1055769718 1634 80.91.224.249 (16 Jun 2003 13:21:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 16 Jun 2003 13:21:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 16 15:21:53 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19RttV-0000ED-00 for ; Mon, 16 Jun 2003 15:19:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19RtvA-0006Ie-2b for gnu-help-gnu-emacs@m.gmane.org; Mon, 16 Jun 2003 09:21:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!lucy.is.informatik.uni-duisburg.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: lucy.is.informatik.uni-duisburg.de (134.91.35.216) Original-X-Trace: fu-berlin.de 1055769492 20844059 134.91.35.216 (16 [73968]) Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:7vExYdpMhiznOuVeTnKnWMY0onI= Original-Xref: shelby.stanford.edu gnu.emacs.help:114478 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:10969 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10969 "jinneemop" writes: > Thanks a lot. > I add (setq indent-tabs-mode nil) to .emacs, and Emacs uses no > tabs. But it inserts only 2 spaces! > Then I add this (googled from internet) to .emacs: > (defun my-c++-mode-hook () > (c-set-style "k&r") > (setq tab-width 8) > (setq c-basic-offset 8) > (define-key c++-mode-map "\C-m" 'reindent-then-newline-and-indent) > (define-key c++-mode-map "\C-ce" 'c-comment-edit) > (setq c++-auto-hungry-initial-state 'none) > (setq c++-delete-function 'backward-delete-char) > (setq c++-tab-always-indent t) > (setq c-indent-level 8) > (setq c-continued-statement-offset 8) > (setq c++-empty-arglist-indent 8)) > (add-hook 'c++-mode-hook 'my-c++-mode-hook) > It works. That's good :-) > But becase I konw little about lisp, it is Greek to me. :-( How can > I start to learn lisp? There is an Emacs Lisp Introduction. It is part of the development version of Emacs, I think, but also available on ftp.gnu.org and its mirrors. Maybe it would have worked to use M-x customize-variable RET to set c-default-style and c-basic-offset. That would have been simple and would not have required Lisp knowledge. -- This line is not blank.