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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Дата
Msg-id 10007.1250085494@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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>)
Список 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 по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: machine-readable explain output v4