Re: emacs behave like pgjindent?

From: Michael Adler <adler(at)glimpser(dot)org>
To: Dave Cramer <Dave(at)micro-automation(dot)net>
Cc: Michael Adler <adler(at)glimpser(dot)org>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: emacs behave like pgjindent?
Date: 2003-02-07 14:45:05
Message-ID: Pine.NEB.4.53.0302070941030.20145@reva.sixgirls.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


If anyone's interested, this does a decent job. The difference I saw was
that emacs will still let a blank line have a tab on it. pgjindent will
trim it off with entab.

(defun my-jde-mode-hook()
;; attempt to match PostgreSQL's pgjindent style
(setq tab-width 4)
(setq indent-tabs-mode t)
(c-set-offset 'substatement-open 0)
)
(add-hook 'jde-mode-hook 'my-jde-mode-hook)

- Mike Adler

On Fri, 7 Feb 2003, Dave Cramer wrote:
> Date: 07 Feb 2003 09:20:03 -0500
> From: Dave Cramer <Dave(at)micro-automation(dot)net>
> To: Michael Adler <adler(at)glimpser(dot)org>
> Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>,
> Barry Lind <blind(at)xythos(dot)com>
> Subject: Re: [JDBC] emacs behave like pgjindent?
>
> You're welcome to go ahead, but I'm not sure how many folks use emacs. I
> confess to using JBuilder, or vi
>
> Dave
> On Fri, 2003-02-07 at 08:50, Michael Adler wrote:
> > Has anyone crafted a mode-hook so that emacs behaves roughly like
> > pgjindent? The default JDE style is quite different. If no one has done
> > the leg work, I may take a stab.
> >
> > -Mike
> --
> Dave Cramer <Dave(at)micro-automation(dot)net>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Adler 2003-02-07 15:03:46 new class layout to support COPY protocal
Previous Message Dave Cramer 2003-02-07 14:20:03 Re: emacs behave like pgjindent?