Re: updated emacs configuration

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: updated emacs configuration
Дата
Msg-id 20130628011508.GE10027@momjian.us
обсуждение исходный текст
Ответ на Re: updated emacs configuration  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: updated emacs configuration  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Jun 27, 2013 at 05:31:54PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Noah Misch wrote:
> >> Note that emacs and pgindent remain at odds over interior tabs in comments.
> >> When pgindent finds a double-space (typically after a sentence) ending at a
> >> tab stop, it replaces the double-space with a tab.  c-fill-paragraph will
> >> convert that tab to a *single* space, and that can be enough to change many
> >> line break positions.
> 
> > We should really stop pgindent from converting those double-spaces to
> > tabs.  Those tabs are later changed to three or four spaces when wording
> > of the comment is changed, and things start looking very odd.
> 
> +1.  That's probably the single most annoying bit of behavior in pgindent.
> Being a two-spaces-after-a-period kind of guy, it might bite me more
> often than other people, but now that somebody else has brought it up...

That might be caused by entab, actually.  I think there are two cases
here:

*  six-space indented line
*  two spaces in text that happen to land on a tab stop

entab doesn't distinguish them, but it certainly could.  In fact, it
already has an option for that:
-s      Minimum spaces needed to replace with a tab (default = 2).

Should we be using entab -s 3?  That would make a six-space indent be a
tab and two spaces, but it would certainly handle the period-space-space
case.  I actually don't remember people complaining about this.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



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

Предыдущее
От: Nicholas White
Дата:
Сообщение: Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls
Следующее
От: Tom Lane
Дата:
Сообщение: Re: updated emacs configuration