Re: emacs configuration for new perltidy settings

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: emacs configuration for new perltidy settings
Date: 2012-08-28 05:46:21
Message-ID: CAB7nPqT=CgFR0aiyZKihwi_j-7deZxZt66FDfBxurWV7YUW=OQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 12, 2012 at 6:35 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> This might be useful for some people. Here is an emacs configuration
> for perl-mode that is compatible with the new perltidy settings. Note
> that the default perl-mode settings produce indentation that will be
> completely shredded by the new perltidy settings.
>
> (defun pgsql-perl-style ()
> "Perl style adjusted for PostgreSQL project"
> (interactive)
> (setq tab-width 4)
> (setq perl-indent-level 4)
> (setq perl-continued-statement-offset 4)
> (setq perl-continued-brace-offset 4)
> (setq perl-brace-offset 0)
> (setq perl-brace-imaginary-offset 0)
> (setq perl-label-offset -2))
>
> (add-hook 'perl-mode-hook
> (lambda ()
> (if (string-match "postgresql" buffer-file-name)
> (pgsql-perl-style))))
>
Cool thanks!
Very helpful.
--
Michael Paquier
http://michael.otacoo.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2012-08-28 06:48:11 Re: Proof of concept: auto updatable views
Previous Message Amit Kapila 2012-08-28 04:10:33 Re: wal_buffers