[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs: Suppressing auto indentation for C source files
From: |
J. David Boyd |
Subject: |
Re: Emacs: Suppressing auto indentation for C source files |
Date: |
Fri, 14 Oct 2005 14:28:36 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Generic Usenet Account" <usenet@sta.samsung.com> writes:
> My apologies if this posting is off topic.
>
> I want to suppress the auto indentation for C source files in my emacs
> editor (GNU Emacs 21.2.1, XEmacs 21.4). I have added the following two
> lines in my .emacs file, but that does not seem to help:
>
> (setq indent-tabs-mode nil)
> (setq c-indent-line nil)
>
> Any suggestions?
>
> Thanks,
> Gus
I have this in my .emacs to set up things for c-mode:
(defun my-c-mode-common-hook ()
(c-set-style "user")
(c-set-offset 'case-label '+)
(c-set-offset 'substatement-open 0)
(setq fill-column 75)
(imenu-add-menubar-index)
(add-hook 'c-mode-hook 'turn-on-cwarn-mode)
(add-hook 'c-mode-hook
(lambda ()
(set (make-local-variable 'ispell-skip-region-alist)
(cons '("\\\\[abfnrtv\\'\"]") ispell-skip-region-alist))))
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
You need something like this, modified to hold the values you want to set...
Dave