Class around PixMap objects that allows more python-like access. By Joe Strout.
[python/dscho.git] / Misc / ccpy-style.el
blobdd74b0d4f7743aa0c82dbe0856c1aec25783c116
1 ;;; ccpy-style.el --- cc-mode style definition for Python C code
2 ;;
3 ;; Author: 1996 Barry A. Warsaw
4 ;; Created: 6-Dec-1996
5 ;; Version: $Revision$
6 ;; Last Modified: $Date$
7 ;; Keywords: c python languages oop
9 ;;; Commentary
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
25 ;;; Code:
27 (defconst python-cc-style
28 '((indent-tabs-mode . t)
29 (c-basic-offset . 8)
30 (c-offsets-alist . ((substatement-open . 0)
32 (c-hanging-braces-alist . ((brace-list-open)
33 (brace-list-intro)
34 (brace-list-close)
35 (substatement-open after)
36 (block-close . c-snug-do-while)
39 "Standard Python C coding style.")
41 (require 'cc-mode)
42 (if (not (assoc "python" c-style-alist))
43 (c-add-style "python" python-cc-style))
45 (provide 'ccpy-style)
46 ;;; ccpy-style.el ends here