; FILE: pgf-style.el ; AUTHOR: Mark Diekhans ; CREATE DATE: 12 Dec 1998 ; PROJECT: PGF ; DESCRIPTION: C++ style definition for PGF project. ; VERSION: $Revision: 1.1.1.1 $ ;; C/C++ style definition for PGF project. This is derived from the ;; from the Java style. To use this style, Use ;; (pgf-c-style-make-default) ;; in .emacs (setq pgf-c-style '((c-basic-offset . 4) (c-comment-only-line-offset . (0 . 0)) ;; The following preserves Javadoc starter and ender lines (c-hanging-comment-starter-p . nil) (c-hanging-comment-ender-p . nil) (c-offsets-alist . ((inline-open . 0) (topmost-intro-cont . +) (statement-block-intro . +) (knr-argdecl-intro . +) (substatement-open . +) (label . 0) (statement-case-open . +) (statement-cont . +) (arglist-close . c-lineup-arglist) (access-label . 0) )) )) ;; Add PFG style to C style table if it does not already exist. (defun pgf-c-style-install () (or (assoc "pgf-c" c-style-alist) (c-add-style "pgf-c" pgf-c-style))) ;; Call this func to Make the PGF mode the default style for C/C++. (defun pgf-c-style-make-default () (add-hook 'c-mode-hook (function (lambda () (pgf-c-style-install) (c-set-style "pgf-c")))) (add-hook 'c++-mode-hook (function (lambda () (pgf-c-style-install) (c-set-style "pgf-c"))))) ;;; Make Perl indentation smaller. (setq perl-indent-level 2)