unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Indentation in C
@ 2004-01-21 21:37 Varun Sinha
  2004-01-21 21:46 ` Yuri Shtil
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Varun Sinha @ 2004-01-21 21:37 UTC (permalink / raw)


I was wondering how I could get the following done in EMACS-

1) When I hit tab to indent, I'd like the tab to be made up of spaces.
I love the way I can hit tab anywhere on a line, and it indents the
line according to the specifications and I don't want to lose that.
The indentation should be two spaces. I was trying some of the
options, but when (I think) I replaced the tabs with spaces, I lost
the ability to tab anywhere in the line and get indentation.

2) Right now, the curly braces are indented two spaces below the
function call or the control statement, like so

function_name
  {
    .........
    .........
  }

but I need the curly braces to not be indented like so

function_name
{
  ...........
  ...........
}

I tried looking through the documentation for EMACS to get these, but
I wasn't able to make sense out of it. Ordinarily, it wouldn't matter
to me, but the professor for my course has laid down these standards.
I tried asking him and the TA, but they all use VI and told me either
to switch (yeah right) or use manual spacing.

Thanks a lot!!

Varun

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

end of thread, other threads:[~2004-01-22 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-21 21:37 Indentation in C Varun Sinha
2004-01-21 21:46 ` Yuri Shtil
2004-01-21 22:03 ` Andrew Taylor
2004-01-22 11:21 ` Vivek Dasmohapatra

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).