emacs configuration for new perltidy settings

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-07-11T21:35:26Z
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))))



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Make Emacs perl-mode indent more like perltidy.

  2. Make Emacs settings match perltidy configuration