[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tidy up code
From: |
nullius . filius |
Subject: |
Re: tidy up code |
Date: |
Fri, 21 Dec 2007 04:07:05 -0800 (PST) |
User-agent: |
G2/1.0 |
X-no-archive: Yes
Umar Said wrote:
>
> Yes I'm new to Emacs and confused with it. [I'm try to format]
>
> int main(void)
> {
> int a = 1;
> if (a == 1)
> cout << "true" << endl;
> else
> cout << "false" << endl;
> return 0
> }
>
> I've also tried M-x indent-region and other indent command, but still no
> success.
You have to give a hint to emacs that you want to format a c++ file.
You do that by naming the file before you try and format it.
Go to the file menu and click on the menu item 'Visit new File' go to
the directory you want to save your file, and type in your file name
(test.cpp) and click the open button.
Now paste your code into emacs.
Once emacs has a hint on what type of file it is formatting, then
it can format it.
- tidy up code, Umar, 2007/12/21
- Re: tidy up code, Jason Rumney, 2007/12/21
- Re: tidy up code, Umar, 2007/12/21
- Re: tidy up code, Martin Bealby, 2007/12/21
- Re: tidy up code, Umar Said, 2007/12/21
- Re: tidy up code,
nullius . filius <=
- Re: tidy up code, Umar Said, 2007/12/21
- Re: tidy up code, Gabriel Parrondo, 2007/12/23
- Message not available
- Re: tidy up code, Umar Said, 2007/12/25