Re: Emacs vs pg_indent's weird indentation for function declarations

Поиск
Список
Период
Сортировка
От Piotr Stefaniak
Тема Re: Emacs vs pg_indent's weird indentation for function declarations
Дата
Msg-id DB8PR03MB59315C886E551B2D4483099FF2050@DB8PR03MB5931.eurprd03.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Emacs vs pg_indent's weird indentation for function declarations  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Emacs vs pg_indent's weird indentation for function declarations  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 17/05/2019 16.48, Tom Lane wrote:
> I wrote:
>>>> A small problem with the "rejiggering" is that it now makes the wrong
>>>> choice for K&R-style function definitions, causing them to be weirdly
>>>> indented.  For our purposes, that's a non-problem so I'm not excited
>>>> about trying to make it smart enough to recognize those.  We do have
>>>> a couple of amazingly old and crufty K&R-style functions in src/port/,
>>>> though, so probably we'd wish to fix those.

> It doesn't really seem practical to me to make the lookahead function
> smart enough to tell the difference between attributes and K&R-style
> parameter declarations.  What I'm thinking of doing to have an
> upstreamable patch is to invent a new switch, perhaps '-kr'/'-nkr',
> to indicate whether the user is more worried about K&R function
> declarations than she is about function attributes. 

I think it's safe to assume that upstream can drop support for K&R-style 
parameters altogether.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: PROXY protocol support
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Emacs vs pg_indent's weird indentation for function declarations