summaryrefslogtreecommitdiff
path: root/man/flymake.texi
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2005-03-05 18:40:27 +0000
committerThien-Thi Nguyen <ttn@gnuvola.org>2005-03-05 18:40:27 +0000
commit932614621659e0d590c594e362cf9fbd6ca650cf (patch)
treea331961e250994b7a57e779b90f80ba9a72b9050 /man/flymake.texi
parentbb96021a1d4989252f63e345f623fbf7506d88a9 (diff)
downloademacs-932614621659e0d590c594e362cf9fbd6ca650cf.tar.gz
Refill and tweak style in @lisp blocks.
Diffstat (limited to 'man/flymake.texi')
-rw-r--r--man/flymake.texi70
1 files changed, 33 insertions, 37 deletions
diff --git a/man/flymake.texi b/man/flymake.texi
index c505be21b6e..9db7551b18c 100644
--- a/man/flymake.texi
+++ b/man/flymake.texi
@@ -419,19 +419,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-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))))
@end lisp
@code{flymake-perl-init} creates a temporary copy of the buffer
@@ -444,11 +441,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 +455,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 +473,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 +485,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}.
@@ -748,12 +745,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