all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Indenting in emacs
@ 2003-04-30  8:26 seguso
  2003-04-30  9:47 ` seguso
  2003-04-30 12:28 ` Mark Mynsted
  0 siblings, 2 replies; 3+ messages in thread
From: seguso @ 2003-04-30  8:26 UTC (permalink / raw)


Hello,

While programming in C++, I am trying to set the 
indentation style as follows:

func()
{
   for (;;)
   {
      x = 5;
   } 
}


I tried c-set-style, but there is no style which works like that.

Is it possible?

Thank you!

Maurizio
-- 
Maurizio Colucci
Please remove the uppercase letters "S,P,A,M":
seSgPuAsMo.forever@tin.it

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

* Re: Indenting in emacs
  2003-04-30  8:26 Indenting in emacs seguso
@ 2003-04-30  9:47 ` seguso
  2003-04-30 12:28 ` Mark Mynsted
  1 sibling, 0 replies; 3+ messages in thread
From: seguso @ 2003-04-30  9:47 UTC (permalink / raw)


On Wed, 30 Apr 2003 08:26:58 +0000, seguso wrote:

> Hello,
> 
> While programming in C++, I am trying to set the 
> indentation style as follows:
> 
> func()
> {
>    for (;;)
>    {
>       x = 5;
>    } 
> }


Add the following in .emacs

;; personalized indentation c++ and c#
(require 'cc-mode) 
(c-set-offset 'substatement-open 0)
(c-set-offset 'block-open 0)
(c-set-offset 'statement-cont 0)
(c-set-offset 'access-label '*)

-- 
Best Regards,
Maurizio Colucci
Please remove the uppercase letters "S,P,A,M":
seSgPuAsMo.forever@tin.it

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

* Re: Indenting in emacs
  2003-04-30  8:26 Indenting in emacs seguso
  2003-04-30  9:47 ` seguso
@ 2003-04-30 12:28 ` Mark Mynsted
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Mynsted @ 2003-04-30 12:28 UTC (permalink / raw)


>>>>> "seguso" == seguso  <address@in.the.signature> writes:

seguso> Hello,
seguso> While programming in C++, I am trying to set the 
seguso> indentation style as follows:

seguso> func()
seguso> {
seguso>    for (;;)
seguso>    {
seguso>       x = 5;
seguso>    } 
seguso> }


seguso> I tried c-set-style, but there is no style which works
seguso> like that.

That looks like Ellemtel style to me.  Perhaps you could use Ellemtel
then customize it where it deviates from your requirements.

;; use Ellemtel style for all C like languages
(c-set-style "ellemtel")

-- 
-MM
I rarely read email from this address          /"\
because of spam.                               \ /     ASCII Ribbon Campaign
I MAY see it if you put #NOTSPAM#               X      Against HTML Mail
in the subject line.                           / \

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

end of thread, other threads:[~2003-04-30 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-30  8:26 Indenting in emacs seguso
2003-04-30  9:47 ` seguso
2003-04-30 12:28 ` Mark Mynsted

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.