Re: Coding style for emacs

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Gregory Stark <gsstark(at)mit(dot)edu>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Coding style for emacs
Date: 2006-08-26 16:54:39
Message-ID: 200608261654.k7QGsdw05847@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
>
> I will try to draw all this together today or tomorrow. It's not only
> the FAQ that should be patched - the docs and the FAQ should agree with
> each other.

Right.

> In fact, this info arguably belongs in one place only. Which should it be?

Uh, if you put it in the docs, I can reference it from the FAQ, but not
the other way around, so I think the documentation is best.

---------------------------------------------------------------------------

>
> cheers
>
> andrew
>
> Bruce Momjian wrote:
> > I am still waiting for an actual patch to the developer's FAQ for this.
> >
> > ---------------------------------------------------------------------------
> >
> > Gregory Stark wrote:
> >
> >> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> >>
> >>
> >>> I use more or less what is in the developers' FAQ (not surprising, since I
> >>> contributed it). It works just fine for me. See
> >>> http://www.postgresql.org/docs/faqs.FAQ_DEV.html#item1.9
> >>>
> >>> We should probably bring the docs in line with that, unless someone with more
> >>> emacs-fu than me has something to add.
> >>>
> >> Oh, I've been meaning to email about this. There's a file in the source tree
> >> but it's buggy. The code in your FAQ seems ok, but I prefer the way I've done
> >> it:
> >>
> >> (add-hook 'c-mode-hook
> >> (function
> >> (lambda nil
> >> (if (string-match "pgsql" buffer-file-name)
> >> (progn
> >> (c-set-style "bsd")
> >> (setq c-basic-offset 4)
> >> (setq tab-width 4)
> >> (c-set-offset 'case-label '+)
> >> (setq indent-tabs-mode t)
> >> )
> >> ))))
> >>
> >>
> >>
> >>
> >> --
> >> Gregory Stark
> >> EnterpriseDB http://www.enterprisedb.com
> >>
> >>
> >> ---------------------------(end of broadcast)---------------------------
> >> TIP 9: In versions below 8.0, the planner will ignore your desire to
> >> choose an index scan if your joining column's datatypes do not
> >> match
> >>
> >
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-08-26 17:00:47 Re: Performance testing of COPY (SELECT) TO
Previous Message Bruce Momjian 2006-08-26 16:50:59 Re: New XML section for documentation

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-08-26 17:00:47 Re: Performance testing of COPY (SELECT) TO
Previous Message Andrew Dunstan 2006-08-26 14:53:45 Re: Coding style for emacs