unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* newbie help with emacs C style
@ 2003-05-01  0:51 Bret Comstock Waldow
  2003-05-01  8:22 ` John McCabe
  2003-05-01 12:04 ` Kai Großjohann
  0 siblings, 2 replies; 4+ messages in thread
From: Bret Comstock Waldow @ 2003-05-01  0:51 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-01 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-01  0:51 newbie help with emacs C style Bret Comstock Waldow
2003-05-01  8:22 ` John McCabe
2003-05-01 13:31   ` Bret Comstock Waldow
2003-05-01 12:04 ` Kai Großjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).