;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:50:28 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/progmodes/cc-styles.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`cc-styles.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cc-defs cc-vars cc-align] 2)
#@1336 Styles of indentation.
Elements of this alist are of the form:

  (STYLE-STRING [BASE-STYLE] (VARIABLE . VALUE) [(VARIABLE . VALUE) ...])

where STYLE-STRING is a short descriptive string used to select a
style, VARIABLE is any Emacs variable, and VALUE is the intended value
for that variable when using the selected style.

Optional BASE-STYLE if present, is a string and must follow
STYLE-STRING.  BASE-STYLE names a style that this style inherits from.
By default, all styles inherit from the "user" style, which is
computed at run time.  Style loops generate errors.

Two variables are treated specially.  When VARIABLE is
`c-offsets-alist', the VALUE is a list containing elements of the
form:

  (SYNTACTIC-SYMBOL . OFFSET)

as described in `c-offsets-alist'.  These are passed directly to
`c-set-offset' so there is no need to set every syntactic symbol in
your style, only those that are different from the default.

When VARIABLE is `c-special-indent-hook', its VALUE is added to
`c-special-indent-hook' using `add-hook'.  If VALUE is a list, each
element of the list is added with `add-hook'.

Do not change this variable directly.  Use the function `c-add-style'
to add new styles or modify existing styles (it is not a good idea to
modify existing styles -- you should create a new style that inherits
the existing style.
(defconst c-style-alist '(("gnu" (c-basic-offset . 2) (c-comment-only-line-offset 0 . 0) (c-offsets-alist (statement-block-intro . +) (knr-argdecl-intro . 5) (substatement-open . +) (label . 0) (statement-case-open . +) (statement-cont . +) (arglist-intro . c-lineup-arglist-intro-after-paren) (arglist-close . c-lineup-arglist) (inline-open . 0) (brace-list-open . +)) (c-special-indent-hook . c-gnu-impose-minimum) (c-block-comment-prefix . "")) ("k&r" (c-basic-offset . 5) (c-comment-only-line-offset . 0) (c-offsets-alist (statement-block-intro . +) (knr-argdecl-intro . 0) (substatement-open . 0) (label . 0) (statement-cont . +))) ("bsd" (c-basic-offset . 8) (c-comment-only-line-offset . 0) (c-offsets-alist (statement-block-intro . +) (knr-argdecl-intro . +) (substatement-open . 0) (label . 0) (statement-cont . +) (inline-open . 0) (inexpr-class . 0))) ("stroustrup" (c-basic-offset . 4) (c-comment-only-line-offset . 0) (c-offsets-alist (statement-block-intro . +) (substatement-open . 0) (label . 0) (statement-cont . +))) ("whitesmith" (c-basic-offset . 4) (c-comment-only-line-offset . 0) (c-offsets-alist (knr-argdecl-intro . +) (label . 0) (statement-cont . +) (substatement-open . +) (block-open . +) (statement-block-intro . c-lineup-whitesmith-in-block) (block-close . c-lineup-whitesmith-in-block) (inline-open . +) (defun-open . +) (defun-block-intro . c-lineup-whitesmith-in-block) (defun-close . c-lineup-whitesmith-in-block) (brace-list-open . +) (brace-list-intro . c-lineup-whitesmith-in-block) (brace-entry-open . c-indent-multi-line-block) (brace-list-close . c-lineup-whitesmith-in-block) (class-open . +) (inclass . c-lineup-whitesmith-in-block) (class-close . +) (inexpr-class . 0) (extern-lang-open . +) (inextern-lang . c-lineup-whitesmith-in-block) (extern-lang-close . +) (namespace-open . +) (innamespace . c-lineup-whitesmith-in-block) (namespace-close . +))) ("ellemtel" (c-basic-offset . 3) (c-comment-only-line-offset . 0) (c-hanging-braces-alist (substatement-open before after)) (c-offsets-alist (topmost-intro . 0) (topmost-intro-cont . 0) (substatement . +) (substatement-open . 0) (case-label . +) (access-label . -) (inclass . ++) (inline-open . 0))) ("linux" (c-basic-offset . 8) (c-comment-only-line-offset . 0) (c-hanging-braces-alist (brace-list-open) (brace-entry-open) (substatement-open after) (block-close . c-snug-do-while)) (c-cleanup-list brace-else-brace) (c-offsets-alist (statement-block-intro . +) (knr-argdecl-intro . 0) (substatement-open . 0) (label . 0) (statement-cont . +))) ("python" (indent-tabs-mode . t) (fill-column . 78) (c-basic-offset . 8) (c-offsets-alist (substatement-open . 0) (inextern-lang . 0) (arglist-intro . +) (knr-argdecl-intro . +)) (c-hanging-braces-alist (brace-list-open) (brace-list-intro) (brace-list-close) (brace-entry-open) (substatement-open after) (block-close . c-snug-do-while)) (c-block-comment-prefix . "")) ("java" (c-basic-offset . 4) (c-comment-only-line-offset 0 . 0) (c-offsets-alist (inline-open . 0) (topmost-intro-cont . +) (statement-block-intro . +) (knr-argdecl-intro . 5) (substatement-open . +) (label . +) (statement-case-open . +) (statement-cont . +) (arglist-intro . c-lineup-arglist-intro-after-paren) (arglist-close . c-lineup-arglist) (access-label . 0) (inher-cont . c-lineup-java-inher) (func-decl-cont . c-lineup-java-throws)))) (#$ . 723))
(defalias 'c-set-style-1 #[(conscell dont-override) "@A\211\306=\203 \307\310\203 \311	!\202 	\"\202^ \n\312=\203J \203+ \313\202, \314	<\203C \307\f\203> \311	!\202? 	\"\202F \f	!)\202^ \203[ \n>\203[ \nJ\315=\205^ \n	L*\207" [conscell val attr dont-override add-func c-style-variables c-offsets-alist mapcar #[(langentry) "@A\205 \n\f\236?\205 \305\n	\"*\207" [langentry offset langelem dont-override c-offsets-alist c-set-offset] 3] reverse c-special-indent-hook #[(func) "	>?\205\f \302\301\303#\207" [func c-special-indent-hook add-hook t] 4] #[(func) "\301\302\"\207" [func add-hook c-special-indent-hook] 3] set-from-style] 5])
(defalias 'c-get-style-variables #[(style basestyles) "\305\227	\"\206 \305\226	\"\206 \305	\"\206 \306\307\"A\310\230\203) \311\n!\202Q \n@;\2038 \n@\227\nA\2029 \310\211\f>\203F \306\312\f#\210\313\211\fB\"\311\n!\244))\207" [style c-style-alist vars base basestyles assoc error "Undefined style: %s" "user" copy-alist "Style loop detected: %s in %s" c-get-style-variables] 5])
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list c-set-style-history boundp nil] 2)
#@836 Set CC Mode variables to use one of several different indentation styles.
STYLENAME is a string representing the desired style from the list of
styles described in the variable `c-style-alist'.  See that variable
for details of setting up styles.

The variable `c-indentation-style' always contains the buffer's current
style name.

If the optional argument DONT-OVERRIDE is non-nil, no style variables
that already have values will be overridden.  I.e. in the case of
`c-offsets-alist', syntactic symbols will only be added, and in the
case of all other style variables, only those set to `set-from-style'
will be reassigned.

Obviously, specifying DONT-OVERRIDE is useful mainly when the initial
style is chosen for a CC Mode buffer by a major mode.  Since this is
done internally by CC Mode, there's hardly ever a reason to use it.
(defalias 'c-set-style #[(stylename &optional dont-override) "\305 \210\306\307\"\310\311\n\203 	\237\202 	\"\210)\312\304!\205\" \313\211\207" [stylename vars dont-override c-indentation-style zmacs-region-stays c-initialize-builtin-style c-get-style-variables nil mapcar #[(elem) "\302	\"\207" [elem dont-override c-set-style-1] 3] boundp t] 3 (#$ . 6586) (list (let ((completion-ignore-case t) (prompt (format "Which %s indentation style? " mode-name))) (completing-read prompt c-style-alist nil t nil 'c-set-style-history c-indentation-style)))])
#@456 Adds a style to `c-style-alist', or updates an existing one.
STYLE is a string identifying the style to add or update.  DESCRIP is
an association list describing the style and must be of the form:

  ([BASESTYLE] (VARIABLE . VALUE) [(VARIABLE . VALUE) ...])

See the variable `c-style-alist' for the semantics of BASESTYLE,
VARIABLE and VALUE.  This function also sets the current style to
STYLE using `c-set-style' if the optional SET-P flag is non-nil.
(defalias 'c-add-style #[(style descrip &optional set-p) "\227\305	\"\211\203 \n\306!\241\210\202 B	B)\f\205# \307!\207" [style c-style-alist s descrip set-p assoc copy-alist c-set-style] 4 (#$ . 7987) (let ((stylename (completing-read "Style to add: " c-style-alist nil nil nil 'c-set-style-history)) (description (eval-minibuffer "Style description: "))) (list stylename description (y-or-n-p "Set the style too? ")))])
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list c-read-offset-history boundp nil] 2)
(defalias 'c-read-offset #[(langelem) "	\236\206 \301\306N\236\243\307!\310\311\n\"\312\313\fQ\314\fQ(\315)\315*\315+\315,)\204\334 \316(-\317\315\211\320&\211*\321\230\203I \n\202\326 *\322\230\203T \323\202\326 *\324\230\203_ \325\202\326 *\326\230\203j \327\202\326 *\330\230\203u \331\202\326 *\332\230\203\200 \333\202\326 *\334\230\203\213 \335\202\326 \336\337*\"\203\232 \340*!\202\326 \317\341*!\211+!\203\253 +\202\326 \342+!\203\267 +\202\326 \315\343\344\217\210\345,!\204\312 \346,!\203\317 ,\202\326 \347 \210(\315\211)\2032 ).	\207" [langelem c-offsets-alist oldoff symname defstr errmsg c-stylevar-fallback symbol-name format "(default %s): " "Offset must be int, func, var, vector, list, " "or [+,-,++,--,*,/] " " offset " nil completing-read fboundp c-read-offset-history "" "+" + "-" - "++" ++ "--" -- "*" * "/" / string-match "^-?[0-9]+$" string-to-int intern boundp (byte-code "\302!\302\207" [input raw read] 2) ((error)) functionp vectorp ding prompt offset input interned raw obarray] 8])
#@254 Change the value of a syntactic element symbol in `c-offsets-alist'.
SYMBOL is the syntactic element symbol to change and OFFSET is the new
offset for that syntactic element.  The optional argument is not used
and exists only for compatibility reasons.
(defalias 'c-set-offset #[(symbol offset &optional ignored) "\305!\204 \306\307\"\210	\n\236\211\203 \241\210\2020 	\302\310N\236\203+ 	B\nB\2020 \306\311	\"\210)\312\304!\205: \313\211\207" [offset symbol c-offsets-alist entry zmacs-region-stays c-valid-offset error "Offset must be int, func, var, vector, list, or in [+,-,++,--,*,/]: %s" c-stylevar-fallback "%s is not a valid syntactic symbol" boundp t] 4 (#$ . 10042) (let* ((langelem (intern (completing-read (concat "Syntactic symbol to change" (if current-prefix-arg " or add" "") ": ") (mapcar #'(lambda (langelem) (cons (format "%s" (car langelem)) nil)) (get 'c-offsets-alist 'c-stylevar-fallback)) nil (not current-prefix-arg) (let* ((syntax (c-guess-basic-syntax)) (len (length syntax)) (ic (format "%s" (car (nth (1- len) syntax))))) (cons ic 0))))) (offset (c-read-offset langelem))) (list langelem offset current-prefix-arg))])
(defalias 'c-initialize-builtin-style #[nil "\303\304N?\205. \305\303\304\306#\210\307\310\"\204( \307\311\"\204( \312\311\313\314	\"\"\210\312\310\315\"\210\n\205. \316 \207" [c-style-alist c-style-variables c-style-variables-are-local-p c-initialize-builtin-style is-run put t assoc "cc-mode" "user" c-add-style mapcar #[(var) "J\211\302=\203 \303\304\305N\"\202* \306=\203 	\202* 	\307=\203) \305N\202* 	)B\207" [var val c-offsets-alist mapcar #[(langentry) "@	\236\206 \211@AB\207" [langentry val] 3] c-stylevar-fallback c-special-indent-hook set-from-style] 5] ("user") c-make-styles-buffer-local] 5])
#@938 Make all CC Mode style variables buffer local.
If you edit primarily one style of C (or C++, Objective-C, Java, etc)
code, you probably want style variables to be global.  This is the
default.

If you edit many different styles of C (or C++, Objective-C, Java,
etc) at the same time, you probably want the CC Mode style variables
to be buffer local.  If you do, it's advisable to set any CC Mode
style variables in a hook function (e.g. off of `c-mode-common-hook'),
instead of at the top level of your ~/.emacs file.

This function makes all the CC Mode style variables buffer local.
Call it after CC Mode is loaded into your Emacs environment.
Conversely, set the variable `c-style-variables-are-local-p' to t in
your .emacs file, before CC Mode is loaded, and this function will be
automatically called when CC Mode is loaded.

Optional argument, when non-nil, means use `make-local-variable'
instead of `make-variable-buffer-local'.
(defalias 'c-make-styles-buffer-local #[(&optional this-buf-only-p) "\203 \305\202	 \306\307\310	!B\311\312\n\"\210\313\n\"\210\203$ \314\312!\202+ \306\312!\210\315\211*\207" [this-buf-only-p c-style-variables varsyms func c-style-variables-are-local-p make-local-variable make-variable-buffer-local c-indentation-style copy-alist delq c-special-indent-hook mapcar make-local-hook t] 4 (#$ . 11828)])
(provide 'cc-styles)
