From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: updated emacs configuration |
Date: | 2013-06-28 02:11:38 |
Message-ID: | 20130628021138.GF10027@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 27, 2013 at 09:54:45PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Should we be using entab -s 3?
>
> IIUC, that wouldn't affect leading whitespace at all. What it would
> affect I think (outside of comment blocks) is whitespace between code
> and a same-line /* ... */ comment. Personally I'd prefer that a
> tab-stop-aligned /* ... */ comment always have a tab before it, even
> if the expansion of the tab is only *one* space. That is, in
>
> foo(bar, /* comment */
> bar1, /* comment */
> bar12, /* comment */
> bar123, /* comment */
> baz); /* comment */
>
> I think each of those comments ought to have a tab before it, not
> space(s). pgindent currently does this inconsistently --- the bar123
> line will have a space instead. Moving to -s 3 would presumably make
> this worse (even less consistent) not better, since now the bar12 line
> would also be emitted with spaces not a tab.
I think you have grasped the issue. :-)
> Inside a comment, though, probably the behavior of -s 3 would be just
> fine. So the real problem here IMO is that use of tabs ought to be
> context sensitive (behavior inside a comment different from outside),
> and I don't think entab can do that. I see though that it understands
> about C quoted strings, so maybe we could teach it about comments too?
Yes, that could be done.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-06-28 02:33:38 | Re: MVCC catalog access |
Previous Message | Robert Haas | 2013-06-28 01:55:03 | Re: changeset generation v5-01 - Patches & git tree |