help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .emacs


From: Bijan Soleymani
Subject: Re: .emacs
Date: 27 Dec 2002 18:13:16 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Oodini <svdbg@free.fr> writes:

> Hello,
> 
> I am reading "Programmiong with GNU tools", and so I am discovering Unix.
> 
> They say in the book that I am supposed to find in my user directory
> the file .emacs. It wasn't there. So I created it and put these lines
> inside:
> 
> (setq c-indent-level 5)
> (setq c-continued-statement-offset 5)
> (setq c-argdecl-indent 0)
> (setq c-brace-offset -5)
> (setq c-label-offset -5)
> 
> I don't know yet EMacs, but I suppose that with this file, indents
> must be 5 characters when I am in C mode. But that doesn't work...
> 
You should check the documentation for CC-mode if you want to
customize the indentation.

Bijan
>From help-gnu-emacs-bounces@gnu.org  Fri Dec 27 19:20:25 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!feeder2-1.proxad.net!news3-2.free.fr!not-for-mail
Message-ID: <3E0CED7C.7020002@free.fr>
Date: Sat, 28 Dec 2002 01:17:00 +0100
From: Oodini <svdbg@free.fr>
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
MIME-Version: 1.0
Newsgroups: gnu.emacs.help
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 45
Organization: Guest of ProXad - France
NNTP-Posting-Date: 28 Dec 2002 01:16:03 MET
NNTP-Posting-Host: 212.180.9.103
X-Trace: 1041034563 news3-2.free.fr 22331 212.180.9.103:3678
X-Complaints-To: abuse@proxad.net
Xref: shelby.stanford.edu gnu.emacs.help:108522
To: help-gnu-emacs@gnu.org
Subject: C formatting
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 28 Dec 2002 00:20:25 -0000

hello,

I am fighting with EMacs in order to get my programmation style:

void function(int x, int y)
{
      blabla;
      if (...)
      {
           blabla
           blabla
      }
      else
           blabla;
}

I ma desesperatly playing in my .emacs with the following statements, 
but no luck:

(setq c-mode-hook
     (function
       (lambda ()
        (setq c-basic-offset 0)
        (setq c-indent-level 5)
        (setq c-continued-statement-offset 5)
        (setq c-argdecl-indent 0)
        (setq c-brace-offset -5)
        (setq c-label-offset -5)
       )
     )
)

If someone has the same formatiing habits, please give me your setup 
values...

By the way, there is no way, in the buffer, to put two following tabs ??

Thanks for help !

-- 
  .      .
  .  .:::.          ###           \|/        `  ___  '
    :(o o):  .     (o o)         (o o)      -  (O o)  -
ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-


reply via email to

[Prev in Thread] Current Thread [Next in Thread]