Last active
January 1, 2017 21:44
-
-
Save Dyrcona/4216639 to your computer and use it in GitHub Desktop.
My emacs cperl-mode configuration that conforms to the Evergreen coding guidelines.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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 () | |
(evergreen-perl-style) | |
(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