[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replace TAB with 8 whitespaces
From: |
Kai Großjohann |
Subject: |
Re: replace TAB with 8 whitespaces |
Date: |
Mon, 16 Jun 2003 15:17:35 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
"jinneemop" <jinneemop@sohu.com> 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.
- replace TAB with 8 whitespaces, jinneemop, 2003/06/12
- Re: replace TAB with 8 whitespaces, Peter J. Acklam, 2003/06/12
- Re: replace TAB with 8 whitespaces, Henrik Enberg, 2003/06/12
- Re: replace TAB with 8 whitespaces, Alan Mackenzie, 2003/06/13
- Re: replace TAB with 8 whitespaces, Kai Großjohann, 2003/06/13
- Re: replace TAB with 8 whitespaces, jinneemop, 2003/06/16
- Re: replace TAB with 8 whitespaces, Kai Großjohann, 2003/06/16
- Re: replace TAB with 8 whitespaces, jinneemop, 2003/06/16
- Minibuffer and Dabbrev problems, K T Ligesh, 2003/06/16
- Re: replace TAB with 8 whitespaces,
Kai Großjohann <=
- Re: replace TAB with 8 whitespaces, Stefan Monnier, 2003/06/16
- Message not available
- Re: Minibuffer and Dabbrev problems, Kai Großjohann, 2003/06/16
- Re: Minibuffer and Dabbrev problems, Johan Bockgård, 2003/06/16
- Re: Minibuffer and Dabbrev problems, K T Ligesh, 2003/06/16
- Message not available
- Re: Minibuffer and Dabbrev problems, Kevin Rodgers, 2003/06/17
- Re: Minibuffer and Dabbrev problems, K T Ligesh, 2003/06/18
- Message not available
- Re: Minibuffer and Dabbrev problems, Kai Großjohann, 2003/06/18
- Re: Minibuffer and Dabbrev problems, Stefan Monnier, 2003/06/18
- Message not available
- Re: Minibuffer and Dabbrev problems, Kevin Rodgers, 2003/06/18