]> code.delx.au - gnu-emacs/blobdiff - man/flymake.texi
Various cleanups.
[gnu-emacs] / man / flymake.texi
index e710b9033616e1dbceb879a9eb0f16262e785cac..62f3f90b658f09af7c5fc32cc2a6cbc3e4b30e20 100644 (file)
 This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}),
 which is a universal on-the-fly syntax checker for GNU Emacs.
 
-Copyright @copyright{} 2004 Free Software Foundation, Inc.
+Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
+under the terms of the GNU Free Documentation License, Version 1.2 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
 and with the Back-Cover Texts as in (a) below.  A copy of the license
@@ -55,7 +55,6 @@ license to the document, as described in section 6 of the license.
 
 @menu
 * Overview of Flymake::
-* Obtaining Flymake::
 * Installing Flymake::
 * Using Flymake::
 * Configuring Flymake::
@@ -104,16 +103,6 @@ Flymake is a universal syntax checker in the sense that it's easily
 extended to support new syntax check tools and error message
 patterns. @xref{Configuring Flymake}.
 
-@node Obtaining Flymake
-@chapter Obtaining Flymake
-@cindex Getting Flymake
-
-Release versions of Flymake can be downloaded from
-@* @url{https://sourceforge.net/project/showfiles.php?group_id=77501}.
-You can also try current version available via CVS at @url{https://}.
-
-Flymake's homepage is at @url{http://flymake.sourceforge.net}.
-
 @node Installing Flymake
 @chapter Installing
 @cindex Installing Flymake
@@ -292,7 +281,7 @@ check tools and error message patterns.
 @section Customizable variables
 @cindex Customizable variables
 
-This section summarises variables used for Flymake
+This section summarizes variables used for Flymake
 configuration.
 
 @table @code
@@ -378,7 +367,7 @@ first item with @code{filename-regexp} matching buffer filename is
 selected. If no match is found, @code{flymake-mode} is switched off.
 
 @item init-function
-@code{init-function} is required to initialise the syntax check,
+@code{init-function} is required to initialize the syntax check,
 usually by creating a temporary copy of the buffer contents. The
 function must return @code{(list cmd-name arg-list)}. If
 @code{init-function} returns null, syntax check is aborted, by
@@ -419,19 +408,16 @@ checking.
 First, we write the @code{init-function}:
 
 @lisp
-(defun flymake-perl-init(buffer)
-    (let* ((temp-file   (flymake-init-create-temp-buffer-copy
-                            buffer
-                            'flymake-create-temp-inplace))
-                  (local-file  (concat (flymake-build-relative-path
-                                 (file-name-directory
-                                   (buffer-file-name
-                                     (current-buffer)))
-                                                             (file-name-directory temp-file))
-                                                               (file-name-nondirectory temp-file))))
-       (list "perl" (list "-wc " local-file))
-       )
-)
+(defun flymake-perl-init (buffer)
+  (let* ((temp-file (flymake-init-create-temp-buffer-copy
+                     buffer 'flymake-create-temp-inplace))
+         (local-file  (concat (flymake-build-relative-filename
+                               (file-name-directory
+                                (buffer-file-name
+                                 (current-buffer)))
+                               (file-name-directory temp-file))
+                              (file-name-nondirectory temp-file))))
+    (list "perl" (list "-wc " local-file))))
 @end lisp
 
 @code{flymake-perl-init} creates a temporary copy of the buffer
@@ -444,11 +430,11 @@ Next, we add a new entry to the
 
 @lisp
 (setq flymake-allowed-file-name-masks
-         (cons '(".+\\.pl$"
-         flymake-perl-init
-         flymake-simple-cleanup
-         flymake-get-real-file-name)
-       flymake-allowed-file-name-masks))
+      (cons '(".+\\.pl$"
+              flymake-perl-init
+              flymake-simple-cleanup
+              flymake-get-real-file-name)
+            flymake-allowed-file-name-masks))
 @end lisp
 
 Note that we use standard @code{cleanup-function} and
@@ -458,8 +444,9 @@ Finally, we add an entry to @code{flymake-err-line-patterns}:
 
 @lisp
 (setq flymake-err-line-patterns
-         (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1)
-                       flymake-err-line-patterns))
+      (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]"
+              2 3 nil 1)
+            flymake-err-line-patterns))
 @end lisp
 
 @node Example -- Configuring a tool called via make
@@ -475,11 +462,11 @@ functions for @code{make}. We just add a new entry to the
 
 @lisp
 (setq flymake-allowed-file-name-masks
-         (cons '(".+\\.c$"
-           flymake-simple-make-init
-           flymake-simple-cleanup
-           flymake-get-real-file-name)
-      flymake-allowed-file-name-masks))
+      (cons '(".+\\.c$"
+              flymake-simple-make-init
+              flymake-simple-cleanup
+              flymake-get-real-file-name)
+            flymake-allowed-file-name-masks))
 @end lisp
 
 @code{flymake-simple-make-init} builds the following @code{make}
@@ -487,12 +474,11 @@ command line:
 
 @lisp
 (list "make"
-    (list "-s"
-                 "-C"
-                  base-dir
-                 (concat "CHK_SOURCES=" source)
-                 "SYNTAX_CHECK_MODE=1"
-                 "check-syntax"))
+      (list "-s" "-C"
+            base-dir
+            (concat "CHK_SOURCES=" source)
+            "SYNTAX_CHECK_MODE=1"
+            "check-syntax"))
 @end lisp
 
 @code{base-dir} is a directory containing @code{Makefile}, see @ref{Locating the buildfile}.
@@ -542,7 +528,7 @@ lines in the buffer using the accumulated error information.
 
 Syntax check is considered possible if there's an entry in
 @code{flymake-allowed-file-name-masks} matching buffer's filename and
-its @code{init-function} returns non-nil value.
+its @code{init-function} returns non-@code{nil} value.
 
 Two syntax check modes are distinguished:
 
@@ -642,7 +628,7 @@ and project include directories. The former is just the contents of the
 and the way it can be obtained can vary greatly for different projects.
 Therefore, a customizable variable
 @code{flymake-get-project-include-dirs-function} is used to provide the
-way to implement the desired behaviour.
+way to implement the desired behavior.
 
 The default implementation, @code{flymake-get-project-include-dirs-imp},
 uses a @code{make} call. This requires a correct base directory, that is, a
@@ -661,7 +647,7 @@ of every syntax check attempt.
 Flymake can be configured to use different tools for performing syntax
 checks. For example, it can use direct compiler call to syntax check a perl
 script or a call to @code{make} for a more complicated case of a
-@code{C/C++} source.  The general idea is that simple files, like perl
+@code{C/C++} source. The general idea is that simple files, like perl
 scripts and html pages, can be checked by directly invoking a
 corresponding tool. Files that are usually more complex and generally
 used as part of larger projects, might require non-trivial options to
@@ -748,12 +734,11 @@ Flymake also provides an alternative command for starting compilation,
 @code{flymake-compile}:
 
 @lisp
-(defun flymake-compile()
-    "kill all flymake syntax checks, start compilation"
-    (interactive)
-    (flymake-stop-all-syntax-checks)
-    (call-interactively 'compile)
-)
+(defun flymake-compile ()
+  "Kill all flymake syntax checks then start compilation."
+  (interactive)
+  (flymake-stop-all-syntax-checks)
+  (call-interactively 'compile))
 @end lisp
 
 It just kills all the active syntax check processes before calling