[cairo] [rcairo] coding style: GNU -> Ruby

Kouhei Sutou kou at cozmixng.org
Tue Oct 4 22:44:14 PDT 2005


Hi,

In <ac602fd20510042011v4002480xec5d77d76495e8c1 at mail.gmail.com>
  "Re: [cairo] [rcairo] coding style: GNU -> Ruby" on Tue, 4 Oct 2005 22:11:11 -0500,
  Chris Nystrom <cnystrom at gmail.com> wrote:

> > Can I change rcairo's coding style to Ruby from GNU?
> 
> What are the proposed indent flags?

I get good output with '-orig -di2 -cli2'. But there is a
small difference:

indent output:

  switch (...) {
    case ...:
        ...;
        break;
    default:
        ...
        break;
  }

Ruby style:

  switch (...) {
    case ...:
      ...;
      break;
    default:
      ...
      break;
  }


In Emacs's c-mode, Ruby style is the following:

  (c-add-style "ruby" '("bsd"
                        (c-basic-offset . 4)
                        (c-offsets-alist (case-label . 2)
                                         (label . 2)
                                         (statement-case-intro . 2)
                                         (statement-case-open . 2))))

Thanks,
--
kou


More information about the cairo mailing list