unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emcas code style
@ 2004-02-25 11:01 Tobias Boonstoppel
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Boonstoppel @ 2004-02-25 11:01 UTC (permalink / raw)


hi!

could you help me?

i want a to build a emacs mode that indents code like this:

function blah()
 {
 if($somthing == 1)
   {
   foo();
   switch()
     {
     }
   }
  return false;
 }


and NOT like in c++ mode oder PHP mode like this:

function blah()
 {
 if($somthing == 1)
   {
   foo();
   switch()
     {
     }
   }
  return false;
 }



where do i change these settings?
thxx!!!!

Tobias

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

* Re: emcas code style
       [not found] <mailman.455.1077707563.340.help-gnu-emacs@gnu.org>
@ 2004-02-25 13:17 ` Tassilo Horn
  2004-02-25 13:46 ` Alan Mackenzie
  2004-02-25 16:52 ` Kai Grossjohann
  2 siblings, 0 replies; 4+ messages in thread
From: Tassilo Horn @ 2004-02-25 13:17 UTC (permalink / raw)


Tobias Boonstoppel <tobias@webundso.ch> writes:

Perhaps I'm blind but I don't see any differences in

,----
| > function blah()
| >  {
| >  if($somthing == 1)
| >    {
| >    foo();
| >    switch()
| >      {
| >      }
| >    }
| >   return false;
| >  }
`----

and

,----
| > function blah()
| >  {
| >  if($somthing == 1)
| >    {
| >    foo();
| >    switch()
| >      {
| >      }
| >    }
| >   return false;
| >  }
`----

Regards,
        Tassilo

-- 
I just found out that the brain is like a computer. If that's true,
then there really aren't any stupid people. Just people running
windoze.

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

* Re: emcas code style
       [not found] <mailman.455.1077707563.340.help-gnu-emacs@gnu.org>
  2004-02-25 13:17 ` Tassilo Horn
@ 2004-02-25 13:46 ` Alan Mackenzie
  2004-02-25 16:52 ` Kai Grossjohann
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2004-02-25 13:46 UTC (permalink / raw)


Tobias Boonstoppel <tobias@webundso.ch> wrote on Wed, 25 Feb 2004
12:01:45 +0100:
> hi!

> could you help me?

> i want a to build a emacs mode that indents code like this:

> function blah()
>  {
>  if($somthing == 1)
>    {
>    foo();
>    switch()
>      {
>      }
>    }
>   return false;
>  }

> and NOT like in c++ mode oder PHP mode like this:

> function blah()
>  {
>  if($somthing == 1)
>    {
>    foo();
>    switch()
>      {
>      }
>    }
>   return false;
>  }

Pardon me, but I can't see the difference between these two fragments'
indentation.  Maybe too much Elisp programming makes one go blind.

> where do i change these settings?
> thxx!!!!

These settings would be at the heart of the major mode.

However, since you mention c++ mode, I'll tell you where to look to find
out about changing them in that mode.  In the CC Mode manual, have a look
at the pages "Sample .emacs file", then "Customizing Indentation" and
it's sub-pages.

For quick interactive customization, try C-c C-o.

> Tobias

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

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

* Re: emcas code style
       [not found] <mailman.455.1077707563.340.help-gnu-emacs@gnu.org>
  2004-02-25 13:17 ` Tassilo Horn
  2004-02-25 13:46 ` Alan Mackenzie
@ 2004-02-25 16:52 ` Kai Grossjohann
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Grossjohann @ 2004-02-25 16:52 UTC (permalink / raw)


Tobias Boonstoppel <tobias@webundso.ch> writes:

> i want a to build a emacs mode that indents code like this:

The CC mode info file has instructions on customizing indentation.
Did you find them?  Could you understand them?

They might not work for PHP mode, I don't know whether PHP mode is
based on CC mode.

Kai

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

end of thread, other threads:[~2004-02-25 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-25 11:01 emcas code style Tobias Boonstoppel
     [not found] <mailman.455.1077707563.340.help-gnu-emacs@gnu.org>
2004-02-25 13:17 ` Tassilo Horn
2004-02-25 13:46 ` Alan Mackenzie
2004-02-25 16:52 ` Kai Grossjohann

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