+(defgroup flymake nil
+ "Universal on-the-fly syntax checker."
+ :version "23.1"
+ :group 'tools)
+
+(defcustom flymake-error-bitmap '(exclamation-mark error)
+ "Bitmap (a symbol) used in the fringe for indicating errors.
+The value may also be a list of two elements where the second
+element specifies the face for the bitmap. For possible bitmap
+symbols, see `fringe-bitmaps'. See also `flymake-warning-bitmap'.
+
+The option `flymake-fringe-indicator-position' controls how and where
+this is used."
+ :group 'flymake
+ :version "24.3"
+ :type '(choice (symbol :tag "Bitmap")
+ (list :tag "Bitmap and face"
+ (symbol :tag "Bitmap")
+ (face :tag "Face"))))
+
+(defcustom flymake-warning-bitmap 'question-mark
+ "Bitmap (a symbol) used in the fringe for indicating warnings.
+The value may also be a list of two elements where the second
+element specifies the face for the bitmap. For possible bitmap
+symbols, see `fringe-bitmaps'. See also `flymake-error-bitmap'.
+
+The option `flymake-fringe-indicator-position' controls how and where
+this is used."
+ :group 'flymake
+ :version "24.3"
+ :type '(choice (symbol :tag "Bitmap")
+ (list :tag "Bitmap and face"
+ (symbol :tag "Bitmap")
+ (face :tag "Face"))))
+
+(defcustom flymake-fringe-indicator-position 'left-fringe
+ "The position to put flymake fringe indicator.
+The value can be nil (do not use indicators), `left-fringe' or `right-fringe'.
+See `flymake-error-bitmap' and `flymake-warning-bitmap'."
+ :group 'flymake
+ :version "24.3"
+ :type '(choice (const left-fringe)
+ (const right-fringe)
+ (const :tag "No fringe indicators" nil)))
+
+(defcustom flymake-compilation-prevents-syntax-check t
+ "If non-nil, don't start syntax check if compilation is running."
+ :group 'flymake
+ :type 'boolean)
+
+(defcustom flymake-start-syntax-check-on-newline t
+ "Start syntax check if newline char was added/removed from the buffer."
+ :group 'flymake
+ :type 'boolean)
+
+(defcustom flymake-no-changes-timeout 0.5
+ "Time to wait after last change before starting compilation."
+ :group 'flymake
+ :type 'number)
+
+(defcustom flymake-gui-warnings-enabled t
+ "Enables/disables GUI warnings."
+ :group 'flymake
+ :type 'boolean)
+
+(defcustom flymake-start-syntax-check-on-find-file t
+ "Start syntax check on find file."
+ :group 'flymake
+ :type 'boolean)
+
+(defcustom flymake-log-level -1
+ "Logging level, only messages with level lower or equal will be logged.
+-1 = NONE, 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG"
+ :group 'flymake
+ :type 'integer)
+
+(defcustom flymake-xml-program
+ (if (executable-find "xmlstarlet") "xmlstarlet" "xml")
+ "Program to use for XML validation."
+ :type 'file
+ :group 'flymake
+ :version "24.4")
+
+(defcustom flymake-master-file-dirs '("." "./src" "./UnitTest")
+ "Dirs where to look for master files."
+ :group 'flymake
+ :type '(repeat (string)))
+
+(defcustom flymake-master-file-count-limit 32
+ "Max number of master files to check."
+ :group 'flymake
+ :type 'integer)
+
+(defcustom flymake-allowed-file-name-masks
+ '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init)
+ ("\\.xml\\'" flymake-xml-init)
+ ("\\.html?\\'" flymake-xml-init)
+ ("\\.cs\\'" flymake-simple-make-init)
+ ("\\.p[ml]\\'" flymake-perl-init)
+ ("\\.php[345]?\\'" flymake-php-init)
+ ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup)
+ ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup)
+ ("[0-9]+\\.tex\\'" flymake-master-tex-init flymake-master-cleanup)
+ ("\\.tex\\'" flymake-simple-tex-init)
+ ("\\.idl\\'" flymake-simple-make-init)
+ ;; ("\\.cpp\\'" 1)
+ ;; ("\\.java\\'" 3)
+ ;; ("\\.h\\'" 2 ("\\.cpp\\'" "\\.c\\'")
+ ;; ("[ \t]*#[ \t]*include[ \t]*\"\\([\w0-9/\\_\.]*[/\\]*\\)\\(%s\\)\"" 1 2))
+ ;; ("\\.idl\\'" 1)
+ ;; ("\\.odl\\'" 1)
+ ;; ("[0-9]+\\.tex\\'" 2 ("\\.tex\\'")
+ ;; ("[ \t]*\\input[ \t]*{\\(.*\\)\\(%s\\)}" 1 2 ))
+ ;; ("\\.tex\\'" 1)
+ )
+ "Files syntax checking is allowed for.
+This is an alist with elements of the form:
+ REGEXP INIT [CLEANUP [NAME]]
+REGEXP is a regular expression that matches a file name.
+INIT is the init function to use.
+CLEANUP is the cleanup function to use, default `flymake-simple-cleanup'.
+NAME is the file name function to use, default `flymake-get-real-file-name'."
+ :group 'flymake
+ :type '(alist :key-type (regexp :tag "File regexp")
+ :value-type
+ (list :tag "Handler functions"
+ (function :tag "Init function")
+ (choice :tag "Cleanup function"
+ (const :tag "flymake-simple-cleanup" nil)
+ function)
+ (choice :tag "Name function"
+ (const :tag "flymake-get-real-file-name" nil)
+ function))))
+
+(defvar-local flymake-is-running nil