1 ;;; ccpy-style.el --- cc-mode style definition for Python C code
3 ;; Author: 1996 Barry A. Warsaw
6 ;; Last Modified: $Date$
7 ;; Keywords: c python languages oop
10 ;; This file defines the standard C coding style for Python C files
11 ;; and modules. It is compatible with cc-mode.el which should be a
12 ;; standard part of your Emacs distribution (or see
13 ;; <http://www.python.org/ftp/emacs/>).
15 ;; To use, make sure this file is on your Emacs load-path, and simply
16 ;; add this to your .emacs file:
18 ;; (add-hook 'c-mode-common-hook '(lambda () (require 'python-style)))
20 ;; This file will self-install on your c-style-alist variable,
21 ;; although you will have to install it on a per-file basis with:
23 ;; M-x c-set-style RET python RET
27 (defconst python-cc-style
28 '((indent-tabs-mode . t
)
30 (c-offsets-alist .
((substatement-open .
0)
32 (c-hanging-braces-alist .
((brace-list-open)
35 (substatement-open after
)
36 (block-close . c-snug-do-while
)
39 "Standard Python C coding style.")
42 (if (not (assoc "python" c-style-alist
))
43 (c-add-style "python" python-cc-style
))
46 ;;; ccpy-style.el ends here