64 lines
2 KiB
EmacsLisp
64 lines
2 KiB
EmacsLisp
|
;;; prelude-perl.el --- Emacs Prelude: decent Perl coding settings.
|
||
|
;;
|
||
|
;; Copyright (c) 2011 Bozhidar Batsov
|
||
|
;;
|
||
|
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||
|
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||
|
;; Version: 1.0.0
|
||
|
;; Keywords: convenience
|
||
|
|
||
|
;; This file is not part of GNU Emacs.
|
||
|
|
||
|
;;; Commentary:
|
||
|
|
||
|
;; cperl-mode is the best Perl mode for Emacs out there.
|
||
|
|
||
|
;;; License:
|
||
|
|
||
|
;; This program is free software; you can redistribute it and/or
|
||
|
;; modify it under the terms of the GNU General Public License
|
||
|
;; as published by the Free Software Foundation; either version 3
|
||
|
;; of the License, or (at your option) any later version.
|
||
|
;;
|
||
|
;; This program is distributed in the hope that it will be useful,
|
||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
;; GNU General Public License for more details.
|
||
|
;;
|
||
|
;; You should have received a copy of the GNU General Public License
|
||
|
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||
|
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
;; Boston, MA 02110-1301, USA.
|
||
|
|
||
|
;;; Code:
|
||
|
|
||
|
;; use cperl-mode instead of perl-mode
|
||
|
(defalias 'perl-mode 'cperl-mode)
|
||
|
|
||
|
(defun prelude-cperl-mode-hook ()
|
||
|
(setq cperl-indent-level 4)
|
||
|
(setq cperl-continued-statement-offset 8)
|
||
|
;; cperl-hairy affects all those variables, but I prefer
|
||
|
;; a more fine-grained approach as far as they are concerned
|
||
|
(setq cperl-font-lock t)
|
||
|
(setq cperl-electric-lbrace-space t)
|
||
|
(setq cperl-electric-parens nil)
|
||
|
(setq cperl-electric-linefeed nil)
|
||
|
(setq cperl-electric-keywords nil)
|
||
|
(setq cperl-info-on-command-no-prompt t)
|
||
|
(setq cperl-clobber-lisp-bindings t)
|
||
|
(setq cperl-lazy-help-time 3)
|
||
|
|
||
|
;; if you want all the bells and whistles
|
||
|
;; (setq cperl-hairy)
|
||
|
|
||
|
(set-face-background 'cperl-array-face nil)
|
||
|
(set-face-background 'cperl-hash-face nil)
|
||
|
(setq cperl-invalid-face nil))
|
||
|
|
||
|
(add-hook 'cperl-mode-hook 'prelude-cperl-mode-hook t)
|
||
|
|
||
|
(provide 'prelude-perl)
|
||
|
|
||
|
;;; prelude-perl.el ends here
|