emacs configuration for new perltidy settings

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: emacs configuration for new perltidy settings
Date: 2012-07-11 21:35:26
Message-ID: 1342042526.2712.21.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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))))

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-07-11 21:44:22 Re: Event Triggers reduced, v1
Previous Message Mark Thornton 2012-07-11 21:32:33 Re: DELETE vs TRUNCATE explanation