Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 8443E1F6FE32 for ; Wed, 11 Jul 2012 18:35:43 -0300 (ADT) Received: from mailout-de.gmx.net ([213.165.64.22]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Sp4ZQ-00069K-Ga for pgsql-hackers@postgresql.org; Wed, 11 Jul 2012 21:35:42 +0000 Received: (qmail invoked by alias); 11 Jul 2012 21:35:27 -0000 Received: from a88-115-214-103.elisa-laajakaista.fi (EHLO [10.0.0.103]) [88.115.214.103] by mail.gmx.net (mp033) with SMTP; 11 Jul 2012 23:35:27 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1+j7YtrSsGjLTx/LvAiBeGDy1hXaLoqdFRQrcshOW Zjl7yCKruG+gL/ Message-ID: <1342042526.2712.21.camel@vanquo.pezone.net> Subject: emacs configuration for new perltidy settings From: Peter Eisentraut To: pgsql-hackers Date: Thu, 12 Jul 2012 00:35:26 +0300 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/518 X-Sequence-Number: 211201 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))))