Skip to content

Instantly share code, notes, and snippets.

Last active Jan 1, 2017
What would you like to do?
My emacs cperl-mode configuration that conforms to the Evergreen coding guidelines.
;; Use cperl-mode by default
(defalias 'perl-mode 'cperl-mode)
;; cperl-mode doesn't have an add-style command, so we create our
;; style in a defun.
(defun evergreen-perl-style ()
"Set cperl-mode for Evergreen coding guidelines."
(setq cperl-indent-level 4
cperl-brace-offset 0
cperl-continued-brace-offset 0
cperl-label-offset -4
cperl-continued-statement-offset 4
cperl-close-paren-offset -4
cperl-indent-parens-as-block t
cperl-tab-always-indent t
cperl-merge-trailing-else t
cperl-left-aligned-indent-comments t
indent-tabs-mode nil))
;; Some cperl variables that I like to turn on:
(setq cperl-electric-parens t
cperl-electric-parens-mark t
cperl-electric-keywords t
cperl-electric-newline t)
;; cperl-mode hook
(add-hook 'cperl-mode-hook
(lambda ()
(local-set-key (kbd "C-c C-d") 'hungry-delete-forward)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment