From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: Emacs: Suppressing auto indentation for C source files Date: Mon, 17 Oct 2005 13:53:27 +0000 Organization: muc.de e.V. -- private internet access Message-ID: References: <1129301630.992659.11520@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1129561604 11591 80.91.229.2 (17 Oct 2005 15:06:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2005 15:06:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 17 17:06:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ERWYH-0005Mb-DG for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Oct 2005 17:05:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERWYG-00021U-Fh for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Oct 2005 11:05:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.space.net!news.muc.de!not-for-mail Original-Newsgroups: comp.emacs,comp.emacs.xemacs,gnu.emacs.help Original-Followup-To: comp.emacs Original-Lines: 43 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1129560721 64772 193.149.49.134 (17 Oct 2005 14:52:01 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 17 Oct 2005 14:52:01 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu comp.emacs:90346 comp.emacs.xemacs:79026 gnu.emacs.help:134707 Original-To: help-gnu-emacs@gnu.org 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:30289 Archived-At: [Newsgroups: trimmed - Followupto: set] In gnu.emacs.help Generic Usenet Account wrote: > My apologies if this posting is off topic. None needed. The posting is bang on topic. > I want to suppress the auto indentation for C source files in my emacs > editor (GNU Emacs 21.2.1, XEmacs 21.4). The term "auto indentation" covers several aspects in CC Mode. (i) There's the indentation which happens when you type or C-j. (ii) There's the "electric indentation" which happens when you type a semicolon or parenthesis or .... In the current versions of CC Mode (5.28 or 5.30.n: use M-x c-version to see which one you've got), there isn't much control you can exercise over these. In the soon-to-be-released CC Mode 5.31, you can independently disable the "electric indentation". > 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) `c-indent-line' doesn't exist. `indent-tabs-mode' merely says whether you want to use (mainly) tabs to indent with or only spaces. > Any suggestions? Try (setq c-syntactic-indentation nil). If you still want to be able to indent with or C-j, wait for CC Mode 5.31, which will be available on some time "soon". > Thanks, > Gus -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").