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

From Tom Lane
Subject Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Date
Msg-id 10007.1250085494@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Next
From: Tom Lane
Date:
Subject: Re: machine-readable explain output v4