Re: broken comment justification logic in new pgindent

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: broken comment justification logic in new pgindent
Date: 2005-11-07 23:01:12
Message-ID: 200511072301.jA7N1CH20089@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> I'm noticing that the latest pgindent run has frequently rejustified
> block comments to end in column 80 or 81, causing them to wrap in an
> ugly way (at least in emacs). I thought the agreement was to limit
> lines to 79 chars max?
>
> For one example see lines 475 ff in /src/backend/access/nbtree/nbtpage.c
> --- the first lines of two successive paragraphs in the comment have
> been made too long, which they were not before.
>
> I'm not sure about this offhand, but I think that all the cases I've
> seen have involved first lines of paragraphs inside block comments.

Good point. I see the maximum length changed in this commit:

revision 1.70
date: 2004/10/02 01:10:58; author: momjian; state: Exp; lines: +1 -1
Update length from 75 to 79.

We were discussing some pgindent issues at that time on hackers, but I
don't see any complaints about the length, so I am unsure why I modified
it, but perhaps I received a private communication asking why it wasn't
79.

Anyway, I have updated the script to be 78, and attached is a diff
against nbpage.c, but I have not applied a change to that file.

Would you like another pgindent run with the new value of 78? Should be
run on CVS HEAD only or 8.0.X too?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 11.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-07 23:05:58 Re: Any advice about function caching?
Previous Message Cristian Prieto 2005-11-07 22:51:51 Help with Array Function in C language...