unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Bret Comstock Waldow" <bcw1000@hotmail.com>
Subject: newbie help with emacs C style
Date: Thu, 01 May 2003 00:51:03 GMT	[thread overview]
Message-ID: <pan.2003.05.01.00.50.42.663738@hotmail.com> (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

             reply	other threads:[~2003-05-01  0:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-01  0:51 Bret Comstock Waldow [this message]
2003-05-01  8:22 ` newbie help with emacs C style John McCabe
2003-05-01 13:31   ` Bret Comstock Waldow
2003-05-01 12:04 ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pan.2003.05.01.00.50.42.663738@hotmail.com \
    --to=bcw1000@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).