| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| 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-31 01:41:19 |
| Message-ID: | 20120831014119.GH32350@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Jul 12, 2012 at 12:35:26AM +0300, Peter Eisentraut 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))))
Added to src/tools/editors/emacs.samples; applied patch attached.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
| Attachment | Content-Type | Size |
|---|---|---|
| perl.diff | text/x-diff | 1.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2012-08-31 02:07:26 | fairly useless psql compatibility warning? |
| Previous Message | Peter Eisentraut | 2012-08-31 01:14:23 | Re: 9.2rc1 build requirements |