On Wed, Aug 07, 2013 at 07:57:53AM -0400, Peter Eisentraut wrote:
> On 7/2/13 8:42 PM, Peter Eisentraut wrote:
> > Updated files with changes:
> >
> > - adjusted fill-column to 78, per Noah
> > - added c-file-style, per Andrew
> > - support both "postgresql" and "postgres" directory names
> > - use defun instead of lambda, per Dimitri
> > - put Perl configuration back into emacs.samples, for Tom
> >
> > I also added configuration of c-auto-align-backslashes as well as label
> > and statement-case-open to c-offsets-alist. With those changes, the
> > result of indent-region is now very very close to pgindent, with the
> > main exception of the end-of-line de-indenting that pgindent does, which
> > nobody likes anyway.
>
> Did anyone have any outstanding concerns about this latest version? I
> thought it looked ready to commit.
After upgrading to GNU Emacs 23.4.1 from a version predating directory-local
variables, I saw switch/case indentation go on the fritz. My hooks were
issuing (c-set-style "postgresql"), but ".dir-locals.el" set it back to plain
"bsd" style. The most-reasonable fix I found was to locally add c-file-style
to ignored-local-variables. c-file-style is the only setting appearing in
both emacs.samples and .dir-locals.el with non-identical values, so it alone
calls for this treatment. Behavior looks sane in both Emacs 21.4.1 and Emacs
24.3.1, the version extrema I have at hand. Emacs 24.3.1 is fine without this
due to recent c-before-hack-hook changes, but this does no harm. Shall I add
this workaround to emacs.samples?
--
Noah Misch
EnterpriseDB http://www.enterprisedb.com