unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to customize the indentation of coding in C/C++ in emacs?
@ 2009-06-02  3:52 Anand Dhanakshirur
  2009-06-02  7:14 ` tomas
  2009-06-02  7:22 ` Alberto Luaces
  0 siblings, 2 replies; 4+ messages in thread
From: Anand Dhanakshirur @ 2009-06-02  3:52 UTC (permalink / raw)
  To: emacs help

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: asd.vcf --]
[-- Type: text/x-vcard, Size: 177 bytes --]

begin:vcard
fn:Anand Dhanakshirur
n:Dhanakshirur;Anand
email;internet:asd@cdotb.ernet.in
tel;work:(080)-25119295
tel;cell:9886178750
x-mozilla-html:FALSE
version:2.1
end:vcard


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

* Re: How to customize the indentation of coding in C/C++ in emacs?
  2009-06-02  3:52 How to customize the indentation of coding in C/C++ in emacs? Anand Dhanakshirur
@ 2009-06-02  7:14 ` tomas
  2009-06-02  7:31   ` Anand Dhanakshirur
  2009-06-02  7:22 ` Alberto Luaces
  1 sibling, 1 reply; 4+ messages in thread
From: tomas @ 2009-06-02  7:14 UTC (permalink / raw)
  To: Anand Dhanakshirur; +Cc: emacs help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jun 02, 2009 at 09:22:41AM +0530, Anand Dhanakshirur wrote:

Funny, when the content of the mail is more terse than the vcard ;-)

Answer:
    Meta-x customize-variable <ENTER>
  then
    c-offsets-alist <ENTER>

Customize to heart's content!

You may browse your way to there (there are lots of interesting knobs
you might want to get acquainted to) by just typing

    Meta-x customize <ENTER>
  then
    <ENTER>

and click your way along the links:
    Programming -> Languages -> C -> C Syntactic Indentation

(you might want, as an example, switch on "C Echo Syntactic
Information", which lets Emacs put the name of the syntactic construct
in the echo area, sso you can see how the key for this particular
indentation is called).

Hope that helps
- -- tomás
   
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKJNFXBcgs9XrR2kYRAsNFAJoCpKqK7sjYonKIdWrUGkSgvn1QFQCdFb51
HHRB7QuPlE+EK7l7vKJEb6w=
=UCKU
-----END PGP SIGNATURE-----




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

* Re: How to customize the indentation of coding in C/C++ in emacs?
  2009-06-02  3:52 How to customize the indentation of coding in C/C++ in emacs? Anand Dhanakshirur
  2009-06-02  7:14 ` tomas
@ 2009-06-02  7:22 ` Alberto Luaces
  1 sibling, 0 replies; 4+ messages in thread
From: Alberto Luaces @ 2009-06-02  7:22 UTC (permalink / raw)
  To: help-gnu-emacs

Choose one style from the predefined available ones with C-. and then TAB to 
show the list or make yourself one going to Customize 
Emacs->Programming->Languages->C.

Regards,

Alberto






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

* Re: How to customize the indentation of coding in C/C++ in emacs?
  2009-06-02  7:14 ` tomas
@ 2009-06-02  7:31   ` Anand Dhanakshirur
  0 siblings, 0 replies; 4+ messages in thread
From: Anand Dhanakshirur @ 2009-06-02  7:31 UTC (permalink / raw)
  To: tomas; +Cc: emacs help

[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]

Thanks,
I am sorry i was criptic.
All my team members are indenting the files by the command
> indent -bap -bl -ce -l80  bscSmSeAmMsgHlr.cpp
> where,
> -bap -> putting blank line after the defintion of procedure.
> -bl -> formatting the braces
> -ce -> cuddling up the else statement with the previous brace
> -l80 -> for logically breaking the line after 80 columns(no need to 
> scroll to right or enlarge the window)
What i want is, when i press TAB key,
It should indent according to the options given above, So that i don't 
have to run the above command again on a file.
How can i do it in emacs?
Anand

tomas@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, Jun 02, 2009 at 09:22:41AM +0530, Anand Dhanakshirur wrote:
>
> Funny, when the content of the mail is more terse than the vcard ;-)
>
> Answer:
>     Meta-x customize-variable <ENTER>
>   then
>     c-offsets-alist <ENTER>
>
> Customize to heart's content!
>
> You may browse your way to there (there are lots of interesting knobs
> you might want to get acquainted to) by just typing
>
>     Meta-x customize <ENTER>
>   then
>     <ENTER>
>
> and click your way along the links:
>     Programming -> Languages -> C -> C Syntactic Indentation
>
> (you might want, as an example, switch on "C Echo Syntactic
> Information", which lets Emacs put the name of the syntactic construct
> in the echo area, sso you can see how the key for this particular
> indentation is called).
>
> Hope that helps
> - -- tomás
>    
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFKJNFXBcgs9XrR2kYRAsNFAJoCpKqK7sjYonKIdWrUGkSgvn1QFQCdFb51
> HHRB7QuPlE+EK7l7vKJEb6w=
> =UCKU
> -----END PGP SIGNATURE-----
>   


[-- Attachment #2: asd.vcf --]
[-- Type: text/x-vcard, Size: 187 bytes --]

begin:vcard
fn:Anand Dhanakshirur
n:Dhanakshirur;Anand
email;internet:asd@cdotb.ernet.in
tel;work:(080)-25119295
tel;cell:9886178750
x-mozilla-html:FALSE
version:2.1
end:vcard


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

end of thread, other threads:[~2009-06-02  7:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02  3:52 How to customize the indentation of coding in C/C++ in emacs? Anand Dhanakshirur
2009-06-02  7:14 ` tomas
2009-06-02  7:31   ` Anand Dhanakshirur
2009-06-02  7:22 ` Alberto Luaces

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