;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:50:41 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/progmodes/cwarn.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 "`cwarn.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313\314\315&	\207" [require custom font-lock cc-mode custom-declare-group cwarn nil "Highlight suspicious C and C++ constructions." :version "21.1" :link (url-link "http://www.andersl.com/emacs") :group faces] 10)
#@110 *Non-nil when Cwarn mode is active.

Never set this variable directly, use the command `cwarn-mode'
instead.
(defvar cwarn-mode nil (#$ . -917))
#@140 When on, suspicious C and C++ constructions are highlighted.

Set this variable using \[customize] or use the command
`global-cwarn-mode'.
(custom-declare-variable 'global-cwarn-mode 'nil '(#$ . 1069) :group 'cwarn :initialize 'custom-initialize-default :set (lambda (symbol value) (global-cwarn-mode (or value 0))) :type 'boolean :require 'cwarn)
#@421 *List of items each describing which features are enable for a mode.
Each item is on the form (mode featurelist), where featurelist can be
on one of three forms:

* A list of enabled features.
* A list starting with the atom `not' followed by the features
  which are not enabled.
* The atom t, that represent that all features are enabled.

See variable `cwarn-font-lock-feature-keywords-alist' for available
features.
(custom-declare-variable 'cwarn-configuration ''((c-mode (not reference)) (c++-mode t)) '(#$ . -1424) :type '(repeat sexp) :group 'cwarn)
#@207 An alist mapping a CWarn feature to font-lock keywords.
The keywords could either a font-lock keyword list or a symbol.
If it is a symbol it is assumed to be a variable containing a font-lock
keyword list.
(custom-declare-variable 'cwarn-font-lock-feature-keywords-alist ''((assign . cwarn-font-lock-assignment-keywords) (semicolon . cwarn-font-lock-semicolon-keywords) (reference . cwarn-font-lock-reference-keywords)) '(#$ . 1989) :type '(alist :key-type (choice (const assign) (const semicolon) (const reference)) :value-type (sexp :tag "Value")) :group 'cwarn)
#@134 *When nil, CWarn mode will not generate any messages.

Currently, messages are generated when the mode is activated and
deactivated.
(custom-declare-variable 'cwarn-verbose 't '(#$ . -2561) :group 'cwarn :type 'boolean)
#@136 *String to display in the mode line when CWarn mode is active.

(When the string is not empty, make sure that it has a leading space.)
(custom-declare-variable 'cwarn-mode-text '" CWarn" '(#$ . -2788) :tag "CWarn mode text" :group 'cwarn :type 'string)
#@49 *Functions to run when CWarn mode is activated.
(custom-declare-variable 'cwarn-mode-hook 'nil '(#$ . -3047) :tag "CWarn mode hook" :group 'cwarn :type 'hook)
#@218 *String to display when Global CWarn mode is active.

The default is nothing since when this mode is active this text doesn't
vary over time, or between buffers.  Hence mode line text
would only waste precious space.
(custom-declare-variable 'global-cwarn-mode-text '"" '(#$ . -3213) :group 'cwarn :type 'string)
#@51 *Hook called when Global CWarn mode is activated.
(custom-declare-variable 'global-cwarn-mode-hook 'nil '(#$ . -3532) :group 'cwarn :type 'hook)
#@52 *Functions to run when CWarn mode is first loaded.
(custom-declare-variable 'cwarn-load-hook 'nil '(#$ . -3683) :tag "Load Hook" :group 'cwarn :type 'hook)
#@287 Minor mode that highlights suspicious C and C++ constructions.

Note, in addition to enabling this minor mode, the major mode must
be included in the variable `cwarn-configuration'.  By default C and
C++ modes are included.

With ARG, turn CWarn mode on if and only if arg is positive.
(defalias 'cwarn-mode #[(&optional arg) "\304\301!\210\204 	?\202 \305!\306V\n\203( t\203( \307\310	\203% \311\202& \312\"\210\2049 	\2036 \313 \210\2029 \314 \210\315 \210	\205C \316\317!\207" [arg cwarn-mode cwarn-verbose global-cwarn-mode make-local-variable prefix-numeric-value 0 message "Cwarn mode is now %s." "on" "off" cwarn-font-lock-add-keywords cwarn-font-lock-remove-keywords font-lock-fontify-buffer run-hooks cwarn-mode-hook] 3 (#$ . 3846) "P"])
#@129 Turn on CWarn mode.

This function is designed to be added to hooks, for example:
  (add-hook 'c-mode-hook 'turn-on-cwarn-mode)
(defalias 'turn-on-cwarn-mode #[nil "\300\301!\207" [cwarn-mode 1] 2 (#$ . 4606)])
#@134 Hightlight suspicious C and C++ constructions in all buffers.

With ARG, turn CWarn mode on globally if and only if arg is positive.
(defalias 'global-cwarn-mode #[(&optional arg) "\n\204 ?\202 \306\n!\307V\203& t\203& \310\311\203# \312\202$ \313\"\210	=\204\223 \f\314\211\203S @\203E \315@!\210\202J \316@!\210A\211\2045 *\212\317 \314\211\203\222 @\211q\210\203\211 \204\211 \320!\203\211 \203\203 \315 \210\202\206 \316 \210\321 \210A\211\204` +)\205\233 \322\323!\207" [global-cwarn-mode old-global-cwarn-mode arg cwarn-verbose cwarn-configuration conf prefix-numeric-value 0 message "Global CWarn mode is now %s." "on" "off" nil cwarn-font-lock-add-keywords cwarn-font-lock-remove-keywords buffer-list cwarn-is-enabled font-lock-fontify-buffer run-hooks global-cwarn-mode-hook #1=#:--dolist-temp--97285 buffer #2=#:--dolist-temp--97286 font-lock-mode cwarn-mode major-mode] 3 (#$ . 4824) "P"])
#@272 Non-nil if CWarn FEATURE is enabled for MODE.
feature is an atom representing one construction to highlight.

Check if any feature is enabled for MODE if no feature is specified.

The valid features are described by the variable
`cwarn-font-lock-feature-keywords-alist'.
(defalias 'cwarn-is-enabled #[(mode &optional feature) "	\236\211\205* ?\206* \nA@\211\305=\206) \f\242\306=\203& \fA>?\202) \f>))\207" [mode cwarn-configuration mode-configuraion feature list-or-t t not] 3 (#$ . 5774)])
#@47 True if point is inside a C macro definition.
(defalias 'cwarn-inside-macro #[nil "\212\300 \210`SSf\301=\203 \302y\210\202 \303 \210\304f)\305=\207" [beginning-of-line 92 -1 back-to-indentation nil 35] 2 (#$ . 6278)])
#@66 Install keywords into major MODE, or into current buffer if nil.
(defalias 'cwarn-font-lock-add-keywords #[(&optional mode) "\306\211\2032 \n@\211@	A<\204 J\307\206  	\f\"\203* \310\"\210*\nA\211\204 *\306\207" [cwarn-font-lock-feature-keywords-alist pair #1=#:--dolist-temp--97287 keywords feature mode nil cwarn-is-enabled font-lock-add-keywords major-mode] 4 (#$ . 6505)])
#@65 Remove keywords from major MODE, or from current buffer if nil.
(defalias 'cwarn-font-lock-remove-keywords #[(&optional mode) "\306\211\2032 \n@\211@	A<\204 J\307\206  	\f\"\203* \310\"\210*\nA\211\204 *\306\207" [cwarn-font-lock-feature-keywords-alist pair #1=#:--dolist-temp--97288 keywords feature mode nil cwarn-is-enabled font-lock-remove-keywords major-mode] 4 (#$ . 6903)])
(byte-code "\302\303!\204\n \303\304M\210\301B\305\302\207" [current-load-list cwarn-font-lock-assignment-keywords fboundp c-at-toplevel-p #[nil "\301 \302!?\206 \303!)\207" [state c-parse-state c-most-enclosing-brace c-search-uplist-for-classkey] 2 "Return a determination as to whether point is at the `top-level'.\nBeing at the top-level means that point is either outside any\nenclosing block (such function definition), or inside a class\ndefinition, but outside any method blocks.\n\nIf point is not at the top-level (e.g. it is inside a method\ndefinition), then nil is returned.  Otherwise, if point is at a\ntop-level not enclosed within a class definition, t is returned.\nOtherwise, a 2-vector is returned where the zeroth element is the\nbuffer position of the start of the class declaration, and the first\nelement is the buffer position of the enclosing class's opening\nbrace."] ((cwarn-font-lock-match-assignment-in-expression (1 font-lock-warning-face)))] 2)
#@39 Match assignments inside expressions.
(defalias 'cwarn-font-lock-match-assignment-in-expression #[(limit) "\302\303\304	\305#\211\203 \212\306\224b\210\302\307\310\217)\204 )\207" [res limit nil re-search-forward "[^!<>=]\\(=\\)[^=]" t 1 (byte-code "\301\302!\210g\303>?\206! \304 \305\216\306\307x\210\310\307x\210\311 \206  \312\313!*\207" [save-match-data-internal backward-up-list 1 (40 91) match-data ((set-match-data save-match-data-internal)) " " nil "a-zA-Z0-9_" c-at-toplevel-p looking-at "for\\>"] 2) ((error t))] 5 (#$ . 8289)])
(byte-code "\301B\302\301\207" [current-load-list cwarn-font-lock-semicolon-keywords ((cwarn-font-lock-match-dangerous-semicolon (0 font-lock-warning-face)))] 2)
#@134 Match semicolons directly after `for', `while', and `if'.
Tne semicolon after a `do { ... } while (x);' construction is not matched.
(defalias 'cwarn-font-lock-match-dangerous-semicolon #[(limit) "\302\303\304	\305#\211\203 \212\302\306\307\217)\204 )\207" [res limit nil search-forward ";" t (byte-code "\301 \302\216\303\304!\210\305\306!\206 \305\307!\205 \310\311\312\217*?\207" [save-match-data-internal match-data ((set-match-data save-match-data-internal)) backward-sexp 2 looking-at "\\(for\\|if\\)\\>" "while\\>" nil (byte-code "\300\301!\210\302\303!?\207" [backward-sexp 2 looking-at "do\\>"] 2) ((error t))] 3) ((error t))] 5 (#$ . 9007)])
(byte-code "\301B\302\301\207" [current-load-list cwarn-font-lock-reference-keywords ((cwarn-font-lock-match-reference (1 font-lock-warning-face)))] 2)
#@49 Font-lock matcher for C++ reference parameters.
(defalias 'cwarn-font-lock-match-reference #[(limit) "\302\303\304	\305#\211\203 \212\306\224b\210\302\307\310\217)\204 )\207" [res limit nil re-search-forward "[^&]\\(&\\)[^&=]" t 1 (byte-code "\301 \302\216\303\304!\210g\305=?\206 \306 \206 \307 ?*\207" [save-match-data-internal match-data ((set-match-data save-match-data-internal)) backward-up-list 1 40 cwarn-inside-macro c-at-toplevel-p] 2) ((error t))] 5 (#$ . 9828)])
(byte-code "\302\236\204\n \303B\301\236\204 \304B\305\306!\210\307\310!\210	\203$ \301\311!\210\302\207" [minor-mode-alist global-cwarn-mode cwarn-mode (cwarn-mode cwarn-mode-text) (global-cwarn-mode global-cwarn-mode-text) provide cwarn run-hooks cwarn-load-hook 1] 2)
