From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Carsten Burstedde Newsgroups: gmane.emacs.help Subject: C-mode electric braces Date: Tue, 10 Sep 2002 11:47:23 +0200 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3D7DBFAB.2090808@iam.uni-bonn.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1031651285 21811 127.0.0.1 (10 Sep 2002 09:48:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2002 09:48:05 +0000 (UTC) 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 17ohcq-0005ff-00 for ; Tue, 10 Sep 2002 11:48:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ohcv-00012N-00; Tue, 10 Sep 2002 05:48:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17ohcF-0000xz-00 for help-gnu-emacs@gnu.org; Tue, 10 Sep 2002 05:47:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17ohcD-0000xh-00 for help-gnu-emacs@gnu.org; Tue, 10 Sep 2002 05:47:26 -0400 Original-Received: from mail.iam.uni-bonn.de ([131.220.223.6] helo=iam.uni-bonn.de) by monty-python.gnu.org with smtp (Exim 4.10) id 17ohcC-0000xM-00 for help-gnu-emacs@gnu.org; Tue, 10 Sep 2002 05:47:24 -0400 Original-Received: (qmail 5182 invoked from network); 10 Sep 2002 09:47:23 -0000 Original-Received: from unknown (HELO iam.uni-bonn.de) (131.220.223.79) by hermes.iam.uni-bonn.de with SMTP; 10 Sep 2002 09:47:23 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 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:1217 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1217 Hi, I want to customize the electric brace behaviour in C-mode. I looked through the threads of the last months, but did not find a matching subject. 1. When I define array constants, I do not want emacs to put the closing braces on an extra line, which it currently does. When I hit } after int a[3] = { 1, 2, 3 the closing brace jumps to the next line. How can I switch this off? 2. After having typed for (i = 0; i < 3; ++i) I want that hitting the opening brace places it on the next line, then inserts an empty line and the closing brace, and places the cursor in between: { } Any suggestions for my .emacs? Thanks, Carsten