From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oodini Newsgroups: gmane.emacs.help Subject: Re: C formatting Date: Sat, 28 Dec 2002 13:31:18 +0100 Organization: Guest of ProXad - France Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E0D9996.3050603@free.fr> References: <3E0CED7C.7020002@free.fr> <6Q6P9.169$fA3.25203@newsfep1-gui.server.ntli.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1041079040 14213 80.91.224.249 (28 Dec 2002 12:37:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 28 Dec 2002 12:37:20 +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 18SGDP-0003h7-00 for ; Sat, 28 Dec 2002 13:37:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18SGBm-0001Sh-04 for gnu-help-gnu-emacs@m.gmane.org; Sat, 28 Dec 2002 07:35:38 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!news3-2.free.fr!not-for-mail User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: fr-fr, fr Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Date: 28 Dec 2002 13:30:28 MET Original-NNTP-Posting-Host: 212.11.42.3 Original-X-Trace: 1041078628 news3-2.free.fr 22310 212.11.42.3:3059 Original-X-Complaints-To: abuse@proxad.net Original-Xref: shelby.stanford.edu gnu.emacs.help:108537 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5067 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5067 chris.danx a écrit: > Oodini wrote: > >> void function(int x, int y) >> { >> blabla; >> if (...) >> { >> blabla >> blabla >> } >> else >> blabla; >> } > > > This works ok for me and produces indentation like above > > (add-hook 'c-mode-hook (function (lambda () (c-set-style "bsd") (setq > c-basic-offset 4)))) Well, it doesn't do exactly what I want. After the "if", when I press Enter, Emacs put an extra indent, whereas I want it to put the cursor under the "if". I guess it supposes I put the opening brace af the end of the line where there is the "if". -- . . . .:::. ### \|/ ` ___ ' :(o o): . (o o) (o o) - (O o) - ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-