Re: [HACKERS] Indent - Mailing list pgsql-hackers

From Bernard Frankpitt
Subject Re: [HACKERS] Indent
Date
Msg-id 3829C81A.F195D285@pop.dn.net
Whole thread Raw
In response to Indent  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [HACKERS] Indent
List pgsql-hackers
Hi Peter,This puzzled me for some time too, I am guessing that you are using
emacs to edit the code, and you are being tripped up by emacs use of 8
spaces for a tab symbol.  You can change the emacs tab width by
configuring the  emacs variable tab-width.  You can do this on the
buffer that you are editing by using C-h v tab-width to pull up a buffer
that allows you to customize the variable, or you can use a hook to
c-mode to set it whenever you are editing a c-file. I have the following
lines in my .emacs file

;;; Set tab-width in c-mode to 4 spaces
(add-hook 'c-mode-hook       (function (lambda () (set tab-width 4))))


I think that there are some other small differences between emacs c-mode
formatting and the indent formatting that PostgreSQL uses, but the
8-space
tab is the only one that I have fixed. 

Bernie


pgsql-hackers by date:

Previous
From: "Juan Vergara"
Date:
Subject: Locking record behaviour when using transaction -BEGIN/END
Next
From: Goran Thyni
Date:
Subject: Re: [HACKERS] CORBA STATUS