unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Modifying Indentation style
@ 2005-02-18 22:57 Ryan Bowman
  0 siblings, 0 replies; 3+ messages in thread
From: Ryan Bowman @ 2005-02-18 22:57 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 313 bytes --]

I'm trying to change the c indentation style of braces
from
if ( )
  {
  }
to
if ( )
{
}



=====
----
Ryan Bowman

That stupid bird stole my quarter.  I hate birds. - Eddie
----


		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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

* Modifying Indentation Style
@ 2005-02-18 23:01 Ryan Bowman
  2005-02-19  0:41 ` August
  0 siblings, 1 reply; 3+ messages in thread
From: Ryan Bowman @ 2005-02-18 23:01 UTC (permalink / raw)



I want to change the c indentation style (regarding
how braces are indented) from

if ()
  {
  }

to

if ()
{
}

I thought that the following would work but it doesn't
seem to be having any effect.

(c-add-style "ryan" 
             '("gnu" 
               (c-offset-list . ((block-open . -2))))

What is the correct way to accomplish this?

=====
----
Ryan Bowman

That stupid bird stole my quarter.  I hate birds. - Eddie
----

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

* Re: Modifying Indentation Style
  2005-02-18 23:01 Modifying Indentation Style Ryan Bowman
@ 2005-02-19  0:41 ` August
  0 siblings, 0 replies; 3+ messages in thread
From: August @ 2005-02-19  0:41 UTC (permalink / raw)


On fre, 2005-02-18 at 15:01 -0800, Ryan Bowman wrote:
> I want to change the c indentation style (regarding
> how braces are indented) from
> 
> if ()
>   {
>   }
> 
> to
> 
> if ()
> {
> }
> 
> I thought that the following would work but it doesn't
> seem to be having any effect.
> 
> (c-add-style "ryan" 
>              '("gnu" 
>                (c-offset-list . ((block-open . -2))))
> 
> What is the correct way to accomplish this?

Add the pair `(substatement-open . 0)' to `c-offsets-alist' (you can
e.g. type `C-h v c-offset-alist' and choose `customize').

-- 
August

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

end of thread, other threads:[~2005-02-19  0:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-18 22:57 Modifying Indentation style Ryan Bowman
  -- strict thread matches above, loose matches on Subject: below --
2005-02-18 23:01 Modifying Indentation Style Ryan Bowman
2005-02-19  0:41 ` August

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