Re: Coding style for emacs

From: Gregory Stark <gsstark(at)mit(dot)edu>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Coding style for emacs
Date: 2006-08-11 18:52:41
Message-ID: 87odur2jgm.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-08-11 19:21:28 Re: Let psql process files with > 4,294,967,295 lines
Previous Message Jonah H. Harris 2006-08-11 18:09:51 Re: V3 protocol vs INSERT/UPDATE RETURNING

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-08-11 19:34:55 Re: Coding style for emacs
Previous Message Sven Suursoho 2006-08-11 17:10:30 plpython improvements