Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Date: 2009-08-12 13:58:14
Message-ID: 10007.1250085494@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Well, the rule here is simple too (set cinoptions=(0 if you're
> Vim-enabled). It's only function prototypes that are a bit weird, and
> once you understand how it works it's trivial to reproduce.

Yeah. What I normally do if I'm actually trying to reproduce pgindent's
handling of a prototype is:

static int foo(int ...,
bool ...);

* temporarily break the line:

static int
foo(int ...,
bool ...);

* indent continuation lines to match (in Emacs this just means
pressing tab on each line):

static int
foo(int ...,
bool ...);

* rejoin the first line

static int foo(int ...,
bool ...);

It's a couple more keystrokes than letting Emacs do what it would
like, but not exactly hard.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2009-08-12 16:32:35 pgsql: Document the minimum required Python version.
Previous Message Robert Haas 2009-08-12 13:57:15 Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-12 14:01:10 Re: machine-readable explain output v4
Previous Message Robert Haas 2009-08-12 13:57:15 Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)