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

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

newbie help with emacs C style


From: Bret Comstock Waldow
Subject: newbie help with emacs C style
Date: Thu, 01 May 2003 00:51:03 GMT
User-agent: Pan/0.13.3 (That cat's something I can't explain)

I would like to format my C (and C++ and Java) code like this:

function (arguments)
        {
        statement;
        statement;

        if ( something is true )
                {
                statement;
                statement;
                }

        statement;
        }

The names listed in the documentation I've read so far don't make sense to
me - there's not enough of a description of what corresponds to what for
me to pick out which variable I need to set...I think I'm supposed to set
it to "+" to get it to indent - is this right?

Can someone provide the name of the variable that controls the brace and
statement indenting shown above?  Whenever I open a new level of inner
brace on a new line, I want the braces and code to indent the same amount.

Also, can someone tell me where there's a reference that shows what the
#@$^%# names like:

 "'defun-block-intro' In the first line in a top-level defun."

correspond to?  I wouldn't know where to find the definition of a
"top-level defun" - where do you learn such a thing?

I think "defun" means "define function", but I can't figure out why it's
not called a "function definition".  Where do people call them defuns? 
What distinguishes a "top-level" one from whatever else there is?  I'm
aware of nested blocks in C, but I don't know of nested functions...

It's a bit much to bite off all by oneself at first.  Thanks for any help.

Cheers,
Bret



reply via email to

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