From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: G Anna Newsgroups: gmane.emacs.help Subject: Re: automatic indentation in C,C++ modes Date: 23 Apr 2002 07:31:11 +0530 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <3CB7662B.82AA21D9@hiwaay.net> <3CBB052E.4B5C6FAB@hiwaay.net> <3CC05446.50EEB4AD@hiwaay.net> Reply-To: help-gnu-emacs@gnu.org NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019540560 27163 127.0.0.1 (23 Apr 2002 05:42:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2002 05:42:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16zt4Z-00073t-00 for ; Tue, 23 Apr 2002 07:42:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16zt49-00035P-00; Tue, 23 Apr 2002 01:42:13 -0400 Original-Received: from [202.9.174.30] (helo=mailvs.eth.net) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16zt20-00030O-00 for ; Tue, 23 Apr 2002 01:40:01 -0400 Original-Received: from smtp1.eth.net ([202.9.178.22]) by mailvs.eth.net with Microsoft SMTPSVC(5.0.2195.4453); Tue, 23 Apr 2002 11:12:58 +0530 Original-Received: from 202.9.171.203 by smtp1.eth.net (InterScan E-Mail VirusWall NT); Tue, 23 Apr 2002 11:08:40 +0530 Original-To: Tony Harbin In-Reply-To: <3CC05446.50EEB4AD@hiwaay.net> Original-Lines: 42 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 X-OriginalArrivalTime: 23 Apr 2002 05:42:59.0000 (UTC) FILETIME=[B9B2B380:01C1EA89] Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:142 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:142 > Date: Fri, 19 Apr 2002 12:30:46 -0500 > From: Tony Harbin > Subj: Re: automatic indentation in C,C++ modes [snip] > self-insert-command functions. I have a particular indentation > style that is common where I work and I *hate* some software trying > to enforce it's own style. My understanding is that GNU Emacs doesn't do anything unless its asked to do so. Below, I am quoting an extract from the Emacs info documentation. Is this of any help? Electric C Characters In C mode and related modes, certain printing characters are "electric"--in addition to inserting themselves, they also reindent the current line and may insert newlines. This feature is controlled by the variable `c-auto-newline'. The "electric" characters are `{', `}', `:', `#', `;', `,', `<', `>', `/', `*', `(', and `)'. Electric characters insert newlines only when the "auto-newline" feature is enabled (indicated by `/a' in the mode line after the mode name). This feature is controlled by the variable `c-auto-newline'. You can turn this feature on or off with the command `C-c C-a': `C-c C-a' Toggle the auto-newline feature (`c-toggle-auto-state'). With a prefix argument, this command turns the auto-newline feature on if the argument is positive, and off if it is negative. HTH anna -- Get your free e-mail account at http://www.linuxmail.org