aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorPaul Eggert2017-10-12 13:44:16 -0700
committerPaul Eggert2017-10-12 13:44:16 -0700
commit3d0d5b4ebdf19876104d23402606f2b3cc636aca (patch)
tree87febb7bc2409f9502c86802a46915c01c546e7c /doc/misc
parent36375d35aa06e84865cce678559ddfa8f79a9775 (diff)
parent05d0c0f80291d25ea228d4a8572d58540bf08b52 (diff)
downloademacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.tar.gz
emacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.zip
Merge from origin/emacs-26
05d0c0f802 ; * ChangeLog.3: ChangeLog fixes. fbabae6b24 * ChangeLog.3: Update. eab051991e Fix docstring style for 'functionp' e8a7c41b4e Format shell commands in tramp.texi 0526aac4eb Unbreak the button in the Flymake diagnostics buffer again c89f001de1 Add mode map to Flymake diagnostic button f9cd8ee681 Tweak the Flymake diagnostics buffer again 0e83f5f279 Simplify Flymake diagnostics buffer UX cf4a15b9b6 First stab at a Flymake diagnostics buffer e4a1556392 * etc/NEWS (Flymake): Rewrite entry. 00adeb43e9 Improve the Flymake manual 44c6401733 ; * etc/NEWS: Clarify the description of "---" and "+++". 042b3cfbd2 Fix two Flymake bugs 3dfa2ca4dc Don't log "emergencies" in the Flymake legacy backend 1c2e188440 Add full documentation on new Flymake API 0f7f677f82 Fix some Flymake docstrings and messages 21e7075781 Make three new Flymake commands for debugging common problems c9be9a3678 ; INSTALL.REPO: Add -d to "thorough cleaning" suggestion. 5d51403ceb ; Typo fixes, mostly repeated words 0d004ed01a ; Spelling fixes 0485aa76c9 ; * src/lread.c (syms_of_lread) <module-file-suffix>: Fix ... ba7fb37d6a * admin/authors.el (authors-renamed-files-alist): addition. 14dca4a79a ; ChangeLog.3 fixes f352d0257c Fix PWD check on DOS_NT 934f08f3de Fix unlikely overflows with wd length 6c2b1e89ef * lisp/gnus/message.el: Improve last commit 7ed7360855 Fix problems when editing raw undecoded message (Bug#28671) aca5f0072b Avoid encoding errors in message.el 0c36663db5 Improve doc string and prompt of 'grep-read-files' 2da83c9d36 Avoid assertion violations when line numbers are displayed 5b81f65ad0 ; * lisp/emacs-lisp/rmc.el: Minor fix for copyright and li... 11b37b4a9f Be lazy when starting Flymake checks 36ed9a9ede Fix last change in frameset.el 62e5c119af Describe how window dividers can replicate vertical border... e2150d994a Add line-number faces to the display-line-numbers group 89b0023044 Increase xterm click count only within double-click-fuzz 745aea2296 Change pause in fullscreen toggling for NS port (bug#28496) 1cd334cd47 Handle PARENTS properly in tramp-*-handle-make-directory f1c73de47d ; Merge from Gnulib (comment changes only) 7c2c117c91 Improve test for unreachable dirs 2202952b83 * src/xsmfns.c (x_session_initialize): Fix memory leak. a9b72976de Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs i... 64baaff8c5 New option for handling ZWNJ in Arabic text rendering c194fb61c6 Make python prettify symbols into a defvar (Bug#28713) 6dfc778d54 Fix fullscreen crash on macOS (bug#28496) 3db0dc2168 Fix crash when closing fullscreen frame on macOS (bug#28661) bc80da5bd3 Support gio tool in Tramp 349e0eb5ff Fix flymake-goto-next-error when message has %-constructs 0fa353b504 * src/gnutls.c (syms_of_gnutls): Remove duplicated call to... dc6ae15a8d Move the entry about 'format' into Incompatible Lisp Changes 75174a632d Fix glitches in displaying TTY menus 238fbcb20e Create new Edebug spec for docstrings and use it in closures 2d58d51329 Avoid byte-compilation warnings in message.el # Conflicts: # etc/NEWS
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/flymake.texi675
-rw-r--r--doc/misc/htmlfontify.texi2
-rw-r--r--doc/misc/ses.texi2
-rw-r--r--doc/misc/tramp.texi22
4 files changed, 568 insertions, 133 deletions
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index a85fe4a30e1..d89a555ff73 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -1,4 +1,4 @@
1\input texinfo @c -*-texinfo-*- 1\input texinfo @c -*-texinfo; coding: utf-8 -*-
2@comment %**start of header 2@comment %**start of header
3@setfilename ../../info/flymake.info 3@setfilename ../../info/flymake.info
4@set VERSION 0.3 4@set VERSION 0.3
@@ -6,6 +6,8 @@
6@settitle GNU Flymake @value{VERSION} 6@settitle GNU Flymake @value{VERSION}
7@include docstyle.texi 7@include docstyle.texi
8@syncodeindex pg cp 8@syncodeindex pg cp
9@syncodeindex vr cp
10@syncodeindex fn cp
9@comment %**end of header 11@comment %**end of header
10 12
11@copying 13@copying
@@ -61,32 +63,20 @@ modify this GNU manual.''
61 63
62@node Overview of Flymake 64@node Overview of Flymake
63@chapter Overview 65@chapter Overview
64@cindex Overview of Flymake 66@cindex overview of flymake
65 67
66Flymake is a universal on-the-fly buffer checker implemented as an 68Flymake is a universal on-the-fly buffer checker implemented as an
67Emacs minor mode. When enabled, Flymake visually annotates the buffer 69Emacs minor mode. When enabled, Flymake visually annotates the buffer
68with diagnostic information coming from one or more different sources, 70with diagnostic information coming from one or more different sources,
69or @emph{backends}. 71or @dfn{backends}.
70
71Historically, Flymake used to accept diagnostics from a single, albeit
72reasonably flexible, backend.
73
74This backend isn't (yet) obsolete and so is still available as a
75fallback and active by default(@pxref{The legacy Proc backend}). It works by
76selecting a syntax check tool from a preconfigured list (compiler for
77C++ files, @code{perl} for perl files, etc.), and executing it in the
78background, passing it a temporary file which is a copy of the current
79buffer, and parsing the output for known error/warning message
80patterns.
81 72
82Flymake annotates the buffer by highlighting problematic buffer 73Flymake annotates the buffer by highlighting problematic buffer
83regions with a special space. It also displays an overall buffer 74regions with a special space. It displays an overall buffer status in
84status in the mode line. Status information displayed by Flymake 75the mode line containing totals for different types of diagnostics.
85contains totals for different types of diagnostics.
86 76
87@code{flymake-goto-next-error} and @code{flymake-goto-prev-error} are 77@code{flymake-goto-next-error} and @code{flymake-goto-prev-error} are
88commands that allow easy navigation to the next/previous erroneous 78commands that allow easy navigation to the next/previous erroneous
89line, respectively. If might be a good idea to map them to @kbd{M-n} 79line, respectively. If might be a good idea to map them to @kbd{M-n}
90and @kbd{M-p} in @code{flymake-mode}, by adding to your init file: 80and @kbd{M-p} in @code{flymake-mode}, by adding to your init file:
91 81
92@lisp 82@lisp
@@ -97,48 +87,67 @@ and @kbd{M-p} in @code{flymake-mode}, by adding to your init file:
97Syntax check is done ``on-the-fly''. It is started whenever 87Syntax check is done ``on-the-fly''. It is started whenever
98 88
99@itemize @bullet 89@itemize @bullet
100@item @code{flymake-mode} is started; 90@item
101@item a newline character is added to the buffer; 91@code{flymake-mode} is started, unless
102@item some changes were made to the buffer more than @code{0.5} seconds ago (the 92@code{flymake-start-on-flymake-mode} is nil.
103delay is configurable). 93
94@item
95a newline character is added to the buffer, unless
96@code{flymake-start-syntax-check-on-newline} is nil.
97
98@item
99some changes were made to the buffer more than @code{0.5} seconds ago
100(the delay is configurable in @code{flymake-no-changes-timeout}).
104@end itemize 101@end itemize
105 102
106Flymake is a universal syntax checker in the sense that it's easily 103Flymake is a universal syntax checker in the sense that it's easily
107extended to support new backends. @xref{Customizable variables}. 104extended to support new backends (@pxref{Extending Flymake}).
105
106Historically, Flymake used to accept diagnostics from a single, albeit
107reasonably flexible, backend.
108
109This backend isn't (yet) obsolete, and so is still available as a
110fallback and active by default (@pxref{The legacy Proc backend}). It works by
111selecting a syntax check tool from a preconfigured list (compiler for
112C@t{++} files, @command{perl} for Perl files, etc.), and executing it in the
113background, passing it a temporary file which is a copy of the current
114buffer, and parsing the output for known error/warning message
115patterns.
108 116
109@node Installing Flymake 117@node Installing Flymake
110@chapter Installing 118@chapter Installing
111@cindex Installing Flymake 119@cindex installing flymake
112 120
113Flymake is included with Emacs and its main commands, like 121Flymake is included with Emacs and its main commands, like
114@code{flymake-mode}, are autoloaded. This means there is usually 122@code{flymake-mode}, are autoloaded. This means there is usually
115nothing to do by way of installation. 123nothing to do by way of installation.
116 124
117@node Using Flymake 125@node Using Flymake
118@chapter Using Flymake 126@chapter Using Flymake
119@cindex Using Flymake 127@cindex using flymake
120 128
121@menu 129@menu
122* Flymake mode:: 130* Flymake mode::
123* Running the syntax check:: 131* Running the syntax check::
124* Navigating to error lines:: @c * Viewing error messages:: 132* Navigating to error lines:: @c * Viewing error messages::
125* Syntax check statuses:: 133* Syntax check statuses::
126* Troubleshooting:: 134* Backend exceptions::
127* Customizable variables:: 135* Customizable variables::
128@end menu 136@end menu
129 137
130@node Flymake mode 138@node Flymake mode
131@section Flymake mode 139@section Flymake mode
132@cindex flymake-mode 140@cindex flymake-mode
141@cindex activating flymake-mode
133 142
134Flymake is an Emacs minor mode. To use Flymake, you 143Flymake is an Emacs minor mode. To use Flymake, you
135must first activate @code{flymake-mode} by using the 144must first activate @code{flymake-mode} by using the command
136@code{flymake-mode} function. 145@kbd{flymake-mode}.
137 146
138Instead of manually activating @code{flymake-mode}, you can configure 147Instead of manually activating @code{flymake-mode}, you can configure
139Flymake to automatically enable @code{flymake-mode} upon opening any 148Emacs to automatically enable @code{flymake-mode} upon opening any
140file for which syntax check is possible. To do so, place the following 149file for which syntax check is possible. To do so, place the following
141line in @code{.emacs}: 150line in your @file{~/.emacs}:
142 151
143@lisp 152@lisp
144(add-hook 'find-file-hook 'flymake-find-file-hook) 153(add-hook 'find-file-hook 'flymake-find-file-hook)
@@ -146,31 +155,33 @@ line in @code{.emacs}:
146 155
147@node Running the syntax check 156@node Running the syntax check
148@section Running the syntax check 157@section Running the syntax check
149@cindex Manually starting the syntax check 158@cindex manually starting syntax check
159@cindex syntax check, start manually
150 160
161@findex flymake-start
151When @code{flymake-mode} is active, syntax check is started 162When @code{flymake-mode} is active, syntax check is started
152automatically on any of the three conditions mentioned above. Syntax 163automatically on any of the three conditions mentioned in
153check can also be started manually by using the @code{flymake-start} 164@ref{Overview of Flymake}. Syntax check can also be started manually
154function. 165by typing the @kbd{M-x flymake-start @key{RET}} command.
155 166
156@node Navigating to error lines 167@node Navigating to error lines
157@section Navigating to error lines 168@section Navigating to error lines
158@cindex Navigating to error lines 169@cindex navigating to error lines
159 170
160After syntax check is completed, lines for which at least one error or 171After syntax check is completed, lines for which at least one error or
161warning has been reported are highlighted, and total number of errors 172warning has been reported are highlighted, and the total number of errors
162and warning is shown in the mode line. Use the following functions to 173and warning is shown in the mode line. Use the following functions to
163navigate the highlighted lines. 174navigate the highlighted lines:
164
165@multitable @columnfractions 0.25 0.75
166 175
167@item @code{flymake-goto-next-error} 176@table @code
168@tab Moves point to the next erroneous line, if any. 177@findex flymake-goto-next-error
169 178@item flymake-goto-next-error
170@item @code{flymake-goto-prev-error} 179Moves point to the next erroneous line, if any.
171@tab Moves point to the previous erroneous line.
172 180
173@end multitable 181@findex flymake-goto-prev-error
182@item flymake-goto-prev-error
183Moves point to the previous erroneous line.
184@end table
174 185
175If the user option @code{flymake-wrap-around} is active 186If the user option @code{flymake-wrap-around} is active
176(@pxref{Customizable variables}), these functions treat diagnostics 187(@pxref{Customizable variables}), these functions treat diagnostics
@@ -181,7 +192,7 @@ to the first diagnostic when invoked in the end of the buffer.
181@section Syntax check statuses 192@section Syntax check statuses
182@cindex Syntax check statuses 193@cindex Syntax check statuses
183 194
184After syntax check is finished, its status is displayed in the mode line. 195While enabled, Flymake displays its status in the mode line.
185The following statuses are defined: 196The following statuses are defined:
186 197
187@multitable @columnfractions 0.25 0.75 198@multitable @columnfractions 0.25 0.75
@@ -191,8 +202,9 @@ where questioned.
191 202
192@item @code{!} 203@item @code{!}
193@tab All the configured Flymake backends have disabled themselves. 204@tab All the configured Flymake backends have disabled themselves.
194Left-clicking the ``Flymake'' mode line indicator beings the user 205Left-clicking Flymake's mode line indicator pops up a menu listing the
195@code{*Flymake log*} buffer where these situations may be investigated 206option to visit Flymake's log buffer. In this buffer these situations
207can be investigated.
196 208
197@item @code{?} 209@item @code{?}
198@tab There are no configured Flymake backends in 210@tab There are no configured Flymake backends in
@@ -203,34 +215,62 @@ Left-clicking the ``Flymake'' mode line indicator beings the user
203check process. 215check process.
204@end multitable 216@end multitable
205 217
206@node Troubleshooting 218@node Backend exceptions
207@section Troubleshooting 219@section Backend exceptions
208@cindex Logging 220@cindex backend exceptions
209@cindex Troubleshooting 221
210 222@cindex disabled backends
211Flymake uses a simple logging facility for indicating important points 223@cindex backends, disabled
224Some backends may take longer than others to respond or complete, and
225some may decide to @emph{disable} themselves if they are not suitable
226for the current buffer. A disabled backend is not tried again for
227future checks of the current buffer.
228
229@findex flymake-reporting-backends
230@findex flymake-running-backends
231@findex flymake-disabled-backends
232The commands @code{flymake-reporting-backends},
233@code{flymake-running-backends} and @code{flymake-disabled-backends}
234show the backends currently used and those which are disabled.
235
236@cindex reset disabled backends
237Toggling @code{flymake-mode} off and on again, or invoking
238@code{flymake-start} with a prefix argument is one way to reset the
239disabled backend list, so that they will be tried again in the next check.
240
241@cindex logging
242@cindex flymake logging
243Flymake also uses a simple logging facility for indicating important points
212in the control flow. The logging facility sends logging messages to 244in the control flow. The logging facility sends logging messages to
213the @file{*Flymake log*} buffer. The information logged can be used for 245the @file{*Flymake log*} buffer. The information logged can be used for
214resolving various problems related to Flymake. 246resolving various problems related to Flymake.
215 247
248@vindex warning-minimum-log-level
249@vindex warning-minimum-level
216Logging output is controlled by the Emacs @code{warning-minimum-log-level} 250Logging output is controlled by the Emacs @code{warning-minimum-log-level}
217and @code{warning-minimum-level} variables. 251and @code{warning-minimum-level} variables.
218 252
219@node Customizable variables 253@node Customizable variables
220@section Customizable variables 254@section Customizable variables
221@cindex Customizable variables 255@cindex customizable variables
256@cindex variables for customizing flymake
222 257
223This section summarizes variables used for the configuration of the 258This section summarizes customization variables used for the
224Flymake user interface. 259configuration of the Flymake user interface.
225 260
226@table @code 261@vtable @code
227@item flymake-no-changes-timeout 262@item flymake-no-changes-timeout
228If any changes are made to the buffer, syntax check is automatically 263If any changes are made to the buffer, syntax check is automatically
229started after @code{flymake-no-changes-timeout} seconds. 264started after this many seconds, unless the user makes another change,
265which resets the timer.
230 266
231@item flymake-start-syntax-check-on-newline 267@item flymake-start-syntax-check-on-newline
232A boolean flag indicating whether to start syntax check after a 268A boolean flag indicating whether to start syntax check immediately
233newline character is added to the buffer. 269after a newline character is inserted into the buffer.
270
271@item flymake-start-on-flymake-mode
272A boolean flag indicating whether to start syntax check immediately
273after enabling @code{flymake-mode}.
234 274
235@item flymake-error 275@item flymake-error
236A custom face for highlighting regions for which an error has been 276A custom face for highlighting regions for which an error has been
@@ -258,16 +298,406 @@ Which fringe (if any) should show the warning/error bitmaps.
258@item flymake-wrap-around 298@item flymake-wrap-around
259If non-nil, moving to errors with @code{flymake-goto-next-error} and 299If non-nil, moving to errors with @code{flymake-goto-next-error} and
260@code{flymake-goto-prev-error} wraps around buffer boundaries. 300@code{flymake-goto-prev-error} wraps around buffer boundaries.
261 301@end vtable
262@end table
263 302
264@node Extending Flymake 303@node Extending Flymake
265@chapter Extending Flymake 304@chapter Extending Flymake
266@cindex Extending Flymake 305@cindex extending flymake
306
307Flymake can primarily be extended in one of two ways:
308
309@enumerate
310@item
311By changing the look and feel of the annotations produced by the
312different backends.
313
314@item
315By adding a new buffer-checking backend.
316@end enumerate
317
318The following sections discuss each approach in detail.
319
320@menu
321* Flymake error types::
322* Backend functions::
323@end menu
324
325@node Flymake error types
326@section Customizing Flymake error types
327@cindex customizing error types
328@cindex error types, customization
329
330@vindex flymake-diagnostic-types-alist
331The variable @code{flymake-diagnostic-types-alist} is looked up by
332Flymake every time an annotation for a diagnostic is created in the
333buffer. Specifically, this variable holds a table of correspondence
334between symbols designating diagnostic types and an additional
335sub-table of properties pertaining to each diagnostic type.
336
337Both tables are laid out in association list (@pxref{Association
338Lists,,, elisp, The Emacs Lisp Reference Manual}) format, and thus can
339be conveniently accessed with the functions of the @code{assoc}
340family.
341
342You can use any symbol-value association in the properties sub-table,
343but some symbols have special meaning as to where and how Flymake
344presents the diagnostic:
345
346@itemize
347
348@item
349@cindex bitmap of diagnostic
350@code{bitmap}, an image displayed in the fringe according to
351@code{flymake-fringe-indicator-position}. The value actually follows
352the syntax of @code{flymake-error-bitmap} (@pxref{Customizable
353variables}). It is overridden by any @code{before-string} overlay
354property.
355
356@item
357@cindex severity of diagnostic
358@code{severity} is a non-negative integer specifying the diagnostic's
359severity. The higher the value, the more serious is the error. If
360the overlay property @code{priority} is not specified, @code{severity}
361is used to set it and help sort overlapping overlays.
362
363@item
364Every property pertaining to overlays (@pxref{Overlay Properties,,,
365elisp, The Emacs Lisp Reference Manual}), except @code{category} and
366@code{evaporate}. These properties are used to affect the appearance
367of Flymake annotations.
368
369As an example, here's how to make errors (diagnostics of the type
370@code{:error}) stand out even more prominently in the buffer, by
371raising the characters using a @code{display} overlay property.
372
373@example
374(push '(display . (raise 1.2))
375 (cdr (assoc :error flymake-diagnostic-types-alist)))
376@end example
377
378@item
379@vindex flymake-category
380@code{flymake-category} is a symbol whose property list is considered
381the default for missing values of any other properties.
382@end itemize
383
384@cindex predefined diagnostic types
385@vindex flymake-error
386@vindex flymake-warning
387@vindex flymake-note
388Three default diagnostic types, @code{:error}, @code{:warning} and
389@code{:note} are predefined in
390@code{flymake-diagnostic-types-alist}. By default each lists a single
391@code{flymake-category} property whose value is, respectively, the
392symbols @code{flymake-error}, @code{flymake-warning} and
393@code{flymake-note}.
394
395These category symbols' plists is where the values of customizable
396variables and faces such as @code{flymake-error-bitmap} are found.
397Thus, if you change their plists, Flymake may stop honoring these
398user customizations.
399
400The @code{flymake-category} special property is also especially useful
401for backends which create diagnostics objects with non-default
402types that differ from an existing type by only a few properties
403(@pxref{Flymake utility functions}).
404
405As an example, consider configuring a new diagnostic type
406@code{:low-priority-note} that behaves much like the @code{:note}
407priority but without an overlay face.
408
409@example
410(add-to-list
411 'flymake-diagnostic-types-alist
412 `(:low-priority-note . ((face . nil)
413 (flymake-category . flymake-note))))
414@end example
415
416@vindex flymake-text
417As you might have guessed, Flymake's annotations are implemented as
418overlays (@pxref{Overlays,,, elisp, The Emacs Lisp Reference Manual}).
419Along with the properties that you specify for the specific type of
420diagnostic, Flymake adds the property @code{flymake-text} to these
421overlays, and sets it to the message string that the backend used to
422describe the diagnostic.
423
424Since overlays also support arbitrary keymaps, you can use this
425property @code{flymake-text} to create interactive annotations, such
426as in the following example of binding a @kbd{mouse-3} event (middle
427mouse button click) to an Internet search for the text of a
428@code{:warning} or @code{:error}.
429
430@example
431(defun my-search-for-message (event)
432 (interactive "e")
433 (let ((ovs (overlays-at (posn-point (event-start event))))
434 ov)
435 ;; loop until flymake overlay we clicked on is recovered
436 (while (not (overlay-get (setq ov (pop ovs)) 'flymake-text)))
437 (when ov
438 (eww-browse-url
439 (concat "https://duckduckgo.com/?q="
440 (replace-regexp-in-string " "
441 "+"
442 (overlay-get ov 'flymake-text)))
443 t))))
444
445(dolist (type '(:warning :error))
446 (let ((a (assoc type flymake-diagnostic-types-alist)))
447 (setf (cdr a)
448 (append `((mouse-face . highlight)
449 (keymap . ,(let ((map (make-sparse-keymap)))
450 (define-key map [mouse-2]
451 'my-search-for-message)
452 map)))
453 (cdr a)))))
454@end example
455
456@node Backend functions
457@section Backend functions
458@cindex backend functions
459
460@vindex flymake-diagnostic-functions
461Flymake backends are Lisp functions placed in the special hook
462@code{flymake-diagnostic-functions}.
463
464A backend's responsibility is to diagnose the contents of a buffer for
465problems, registering the problem's positions, type, and summary
466description. This information is collected in the form of diagnostic
467objects created by the function @code{flymake-make-diagnostic}
468(@pxref{Flymake utility functions}), and
469then handed over to Flymake, which proceeds to annotate the
470buffer.
471
472A request for a buffer check, and the subsequent delivery of
473diagnostics, are two key events of the interaction between Flymake
474and backend. Each such event corresponds to a well-defined function
475calling convention: one for calls made by Flymake into the backend via
476the backend function, the other in the reverse direction via a
477callback. To be usable, backends must adhere to both.
478
479Backend functions must accept an arbitrary number of arguments:
480
481@itemize
482@item
483the first argument is always @var{report-fn}, a callback function
484detailed below;
485
486@item
487the remaining arguments are keyword-value pairs of the
488form @w{@code{(@var{:key} @var{value} @var{:key2} @var{value2}...)}}. Currently,
489Flymake provides no such arguments, but backend functions must be
490prepared to accept (and possibly ignore) any number of them.
491@end itemize
492
493Whenever Flymake or the user decide to re-check the buffer, backend
494functions are called as detailed above, and are expected to initiate
495this check, but aren't in any way required to complete it before
496exiting: if the computation involved is expensive, as
497is often the case with large buffers, that slower task should be
498scheduled for the future using asynchronous sub-processes
499(@pxref{Asynchronous Processes,,, elisp, The Emacs Lisp reference
500manual}) or other asynchronous mechanisms.
501
502In any case, backend functions are expected to return quickly or
503signal an error, in which case the backend is disabled
504(@pxref{Backend exceptions}).
505
506If the function returns, Flymake considers the backend to be
507@dfn{running}. If it has not done so already, the backend is expected
508to call the function @var{report-fn} passed to it, at which point
509Flymake considers the backend to be @dfn{reporting}. Backends call
510@var{report-fn} by passing it a single argument @var{report-action}
511followed by an optional list of keyword-value pairs of the form
512@w{@code{(@var{:report-key} @var{value} @var{:report-key2} @var{value2}...)}}.
513
514Currently accepted values for @var{report-action} are:
515
516@itemize
517@item
518A (possibly empty) list of diagnostic objects created by
519@code{flymake-make-diagnostic}, causing Flymake to annotate the
520buffer with this information.
521
522A backend may call @var{report-fn} repeatedly in this manner, but only
523until Flymake considers that the most recently requested buffer check
524is now obsolete, because, say, buffer contents have changed in the
525meantime. The backend is only given notice of this via a renewed call
526to the backend function. Thus, to prevent making obsolete reports and
527wasting resources, backend functions should first cancel any ongoing
528processing from previous calls.
529
530@item
531The symbol @code{:panic}, signaling that the backend has encountered
532an exceptional situation and should be disabled.
533@end itemize
534
535Currently accepted @var{report-key} arguments are:
536
537@itemize
538@item
539@code{:explanation}, whose value should give user-readable
540details of the situation encountered, if any.
541
542@item
543@code{:force}, whose value should be a boolean suggesting
544that Flymake consider the report even if it was somehow
545unexpected.
546@end itemize
547
548@menu
549* Flymake utility functions::
550* An annotated example backend::
551@end menu
552
553@node Flymake utility functions
554@subsection Flymake utility functions
555@cindex utility functions
556
557@cindex create diagnostic object
558Before delivering them to Flymake, backends create diagnostic objects
559by calling the function @code{flymake-make-diagnostic}.
560
561@deffn Function flymake-make-diagnostic buffer beg end type text
562Make a Flymake diagnostic for @var{buffer}'s region from @var{beg} to
563@var{end}. @var{type} is a key to
564@code{flymake-diagnostic-types-alist} and @var{text} is a description
565of the problem detected in this region.
566@end deffn
567
568@cindex buffer position from line and column number
569It is often the case with external syntax tools that a diagnostic's
570position is reported in terms of a line number, and sometimes a column
571number. To convert this information into a buffer position, backends
572can use the following function:
573
574@deffn Function flymake-diag-region buffer line &optional col
575Compute @var{buffer}'s region (@var{beg} . @var{end}) corresponding to
576@var{line} and @var{col}. If @var{col} is nil, return a region just
577for @var{line}. Return nil if the region is invalid.
578@end deffn
579
580@cindex add a log message
581For troubleshooting purposes, backends may record arbitrary
582exceptional or erroneous situations into the Flymake log
583buffer (@pxref{Backend exceptions}):
584
585@deffn Macro flymake-log level msg &optional args
586Log, at level @var{level}, the message @var{msg} formatted with
587@var{args}. @var{level} is passed to @code{display-warning}
588(@pxref{Warning Basics,,, elisp, The Emacs Lisp reference Manual}), which is
589used to display the warning in Flymake's log buffer.
590@end deffn
591
592@node An annotated example backend
593@subsection An annotated example backend
594@cindex example of backend
595@cindex backend, annotated example
596
597This section presents an annotated example of a complete working
598Flymake backend. The example illustrates the process of writing a
599backend as outlined above.
600
601The backend in question is used for checking Ruby source files. It
602uses asynchronous sub-processes (@pxref{Asynchronous Processes,,, elisp,
603The Emacs Lisp Reference Manual}), a common technique for performing
604parallel processing in Emacs.
605
606The following code needs lexical binding (@pxref{Using Lexical
607Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
608
609@example
610;;; ruby-flymake.el --- A ruby Flymake backend -*- lexical-binding: t; -*-
611(defvar-local ruby--flymake-proc nil)
612
613(defun ruby-flymake (report-fn &rest _args)
614 ;; Not having a ruby interpreter is a serious problem which should cause
615 ;; the backend to disable itself, so an @code{error} is signalled.
616 ;;
617 (unless (executable-find
618 "ruby") (error "Cannot find a suitable ruby"))
619 ;; If a live process launched in an earlier check was found, that
620 ;; process is killed. When that process's sentinel eventually runs,
621 ;; it will notice its obsoletion, since it have since reset
622 ;; `ruby-flymake-proc' to a different value
623 ;;
624 (when (process-live-p ruby--flymake-proc)
625 (kill-process ruby--flymake-proc))
626
627 ;; Save the current buffer, the narrowing restriction, remove any
628 ;; narrowing restriction.
629 ;;
630 (let ((source (current-buffer)))
631 (save-restriction
632 (widen)
633 ;; Reset the `ruby--flymake-proc' process to a new process
634 ;; calling the ruby tool.
635 ;;
636 (setq
637 ruby--flymake-proc
638 (make-process
639 :name "ruby-flymake" :noquery t :connection-type 'pipe
640 ;; Make output go to a temporary buffer.
641 ;;
642 :buffer (generate-new-buffer " *ruby-flymake*")
643 :command '("ruby" "-w" "-c")
644 :sentinel
645 (lambda (proc _event)
646 ;; Check that the process has indeed exited, as it might
647 ;; be simply suspended.
648 ;;
649 (when (eq 'exit (process-status proc))
650 (unwind-protect
651 ;; Only proceed if `proc' is the same as
652 ;; `ruby--flymake-proc', which indicates that
653 ;; `proc' is not an obsolete process.
654 ;;
655 (if (eq proc ruby--flymake-proc)
656 (with-current-buffer (process-buffer proc)
657 (goto-char (point-min))
658 ;; Parse the output buffer for diagnostic's
659 ;; messages and locations, collect them in a list
660 ;; of objects, and call `report-fn'.
661 ;;
662 (cl-loop
663 while (search-forward-regexp
664 "^\\(?:.*.rb\\|-\\):\\([0-9]+\\): \\(.*\\)$"
665 nil t)
666 for msg = (match-string 2)
667 for (beg . end) = (flymake-diag-region
668 source
669 (string-to-number (match-string 1)))
670 for type = (if (string-match "^warning" msg)
671 :warning
672 :error)
673 collect (flymake-make-diagnostic source
674 beg
675 end
676 type
677 msg)
678 into diags
679 finally (funcall report-fn diags)))
680 (flymake-log :warning "Cancelling obsolete check %s"
681 proc))
682 ;; Cleanup the temporary buffer used to hold the
683 ;; check's output.
684 ;;
685 (kill-buffer (process-buffer proc)))))))
686 ;; Send the buffer contents to the process's stdin, followed by
687 ;; an EOF.
688 ;;
689 (process-send-region ruby--flymake-proc (point-min) (point-max))
690 (process-send-eof ruby--flymake-proc))))
691
692(defun ruby-setup-flymake-backend ()
693 (add-hook 'flymake-diagnostic-functions 'ruby-flymake nil t))
694
695(add-hook 'ruby-mode-hook 'ruby-setup-flymake-backend)
696@end example
267 697
268@node The legacy Proc backend 698@node The legacy Proc backend
269@chapter The legacy ``Proc'' backend 699@chapter The legacy ``Proc'' backend
270@cindex The legacy Proc backend 700@cindex legacy proc backend
271 701
272@menu 702@menu
273* Proc customization variables:: 703* Proc customization variables::
@@ -282,15 +712,16 @@ If non-nil, moving to errors with @code{flymake-goto-next-error} and
282* Interaction with other modes:: 712* Interaction with other modes::
283@end menu 713@end menu
284 714
715@findex flymake-proc-legacy-backend
285The backend @code{flymake-proc-legacy-backend} was originally designed 716The backend @code{flymake-proc-legacy-backend} was originally designed
286to be extended for supporting new syntax check tools and error message 717to be extended for supporting new syntax check tools and error message
287patterns. It is also controlled by its own set of customization variables 718patterns. It is also controlled by its own set of customization variables
288 719
289@node Proc customization variables 720@node Proc customization variables
290@section Customization variables for the Proc backend 721@section Customization variables for the Proc backend
291@cindex Proc customization variables 722@cindex proc backend customization variables
292 723
293@table @code 724@vtable @code
294@item flymake-proc-allowed-file-name-masks 725@item flymake-proc-allowed-file-name-masks
295A list of @code{(filename-regexp, init-function, cleanup-function 726A list of @code{(filename-regexp, init-function, cleanup-function
296getfname-function)} for configuring syntax check tools. @xref{Adding 727getfname-function)} for configuring syntax check tools. @xref{Adding
@@ -314,22 +745,22 @@ line-idx col-idx err-text-idx)}. @xref{Parsing the output}.
314 745
315@item flymake-proc-diagnostic-type-pred 746@item flymake-proc-diagnostic-type-pred
316A function to classify a diagnostic text as particular type of 747A function to classify a diagnostic text as particular type of
317error. Should be a function taking an error text and returning one of 748error. Should be a function taking an error text and returning one of
318the symbols indexing @code{flymake-diagnostic-types-alist}. If non-nil 749the symbols indexing @code{flymake-diagnostic-types-alist}. If non-nil
319is returned but there is no such symbol in that table, a warning is 750is returned but there is no such symbol in that table, a warning is
320assumed. If nil is returned, an error is assumed. Can also be a 751assumed. If nil is returned, an error is assumed. Can also be a
321regular expression that should match only warnings. This variable 752regular expression that should match only warnings. This variable
322replaces the old @code{flymake-warning-re} and 753replaces the old @code{flymake-warning-re} and
323@code{flymake-warning-predicate}. 754@code{flymake-warning-predicate}.
324 755
325@item flymake-proc-compilation-prevents-syntax-check 756@item flymake-proc-compilation-prevents-syntax-check
326A flag indicating whether compilation and syntax check of the same 757A flag indicating whether compilation and syntax check of the same
327file cannot be run simultaneously. 758file cannot be run simultaneously. @xref{Interaction with other modes}.
328@end table 759@end vtable
329 760
330@node Adding support for a new syntax check tool 761@node Adding support for a new syntax check tool
331@section Adding support for a new syntax check tool 762@section Adding support for a new syntax check tool
332@cindex Adding support for a new syntax check tool 763@cindex adding support for a new syntax check tool
333 764
334@menu 765@menu
335* Example---Configuring a tool called directly:: 766* Example---Configuring a tool called directly::
@@ -371,10 +802,9 @@ will be different from the real ones, as actually the tool works with
371the temporary copy. In most cases, the default implementation 802the temporary copy. In most cases, the default implementation
372provided by Flymake, @code{flymake-proc-get-real-file-name}, can be 803provided by Flymake, @code{flymake-proc-get-real-file-name}, can be
373used as @code{getfname-function}. 804used as @code{getfname-function}.
374
375@end table 805@end table
376 806
377To add support for a new syntax check tool, write corresponding 807To add support for a new syntax check tool, write the corresponding
378@code{init-function} and, optionally, @code{cleanup-function} and 808@code{init-function} and, optionally, @code{cleanup-function} and
379@code{getfname-function}. If the format of error messages reported by 809@code{getfname-function}. If the format of error messages reported by
380the new tool is not yet supported by Flymake, add a new entry to 810the new tool is not yet supported by Flymake, add a new entry to
@@ -385,10 +815,10 @@ support for various syntax check tools.
385 815
386@node Example---Configuring a tool called directly 816@node Example---Configuring a tool called directly
387@subsection Example---Configuring a tool called directly 817@subsection Example---Configuring a tool called directly
388@cindex Adding support for perl 818@cindex adding support for perl
389 819
390In this example, we will add support for @code{perl} as a syntax check 820In this example, we will add support for @command{perl} as a syntax check
391tool. @code{perl} supports the @code{-c} option which does syntax 821tool. @command{perl} supports the @option{-c} option which does syntax
392checking. 822checking.
393 823
394First, we write the @code{init-function}: 824First, we write the @code{init-function}:
@@ -434,7 +864,7 @@ Finally, we add an entry to @code{flymake-proc-err-line-patterns}:
434 864
435@node Example---Configuring a tool called via make 865@node Example---Configuring a tool called via make
436@subsection Example---Configuring a tool called via make 866@subsection Example---Configuring a tool called via make
437@cindex Adding support for C (gcc+make) 867@cindex adding support for C (gcc+make)
438 868
439In this example we will add support for C files syntax checked by 869In this example we will add support for C files syntax checked by
440@command{gcc} called via @command{make}. 870@command{gcc} called via @command{make}.
@@ -464,9 +894,10 @@ command line:
464 "check-syntax")) 894 "check-syntax"))
465@end lisp 895@end lisp
466 896
467@code{base-dir} is a directory containing @code{Makefile}, see @ref{Locating the buildfile}. 897@code{base-dir} is a directory containing the @file{Makefile}, see
898@ref{Locating the buildfile}.
468 899
469Thus, @code{Makefile} must contain the @code{check-syntax} target. In 900Thus, @file{Makefile} must contain the @code{check-syntax} target. In
470our case this target might look like this: 901our case this target might look like this:
471 902
472@verbatim 903@verbatim
@@ -488,11 +919,11 @@ check-syntax:
488 919
489@node Implementation overview 920@node Implementation overview
490@section Implementation overview 921@section Implementation overview
491@cindex Syntax check models 922@cindex syntax check models
492@cindex Master file 923@cindex master file
493 924
494@code{flymake-proc-legacy-backend} saves a copy of the buffer in a 925@code{flymake-proc-legacy-backend} saves a copy of the buffer in a
495temporary file in the buffer's directory (or in the system temp 926temporary file in the buffer's directory (or in the system temporary
496directory, for Java files), creates a syntax check command and 927directory, for Java files), creates a syntax check command and
497launches a process with this command. The output is parsed using a 928launches a process with this command. The output is parsed using a
498list of error message patterns, and error information (file name, line 929list of error message patterns, and error information (file name, line
@@ -511,15 +942,15 @@ Two syntax check modes are distinguished:
511@item 942@item
512Buffer can be syntax checked in a standalone fashion, that is, the 943Buffer can be syntax checked in a standalone fashion, that is, the
513file (its temporary copy, in fact) can be passed over to the compiler to 944file (its temporary copy, in fact) can be passed over to the compiler to
514do the syntax check. Examples are C/C++ (.c, .cpp) and Java (.java) 945do the syntax check. Examples are C/C@t{++} sources (@file{.c},
515sources. 946@file{.cpp}) and Java (@file{.java}).
516 947
517@item 948@item
518Buffer can be syntax checked, but additional file, called master file, 949Buffer can be syntax checked, but additional file, called master file,
519is required to perform this operation. A master file is a file that 950is required to perform this operation. A master file is a file that
520includes the current file, so that running a syntax check tool on it 951includes the current file, so that running a syntax check tool on it
521will also check syntax in the current file. Examples are C/C++ (.h, 952will also check syntax in the current file. Examples are C/C@t{++}
522.hpp) headers. 953headers (@file{.h}, @file{.hpp}).
523 954
524@end enumerate 955@end enumerate
525 956
@@ -534,8 +965,7 @@ tool-specific (routines for Make, Ant, etc.)@: code.
534 965
535@node Making a temporary copy 966@node Making a temporary copy
536@section Making a temporary copy 967@section Making a temporary copy
537@cindex Temporary copy of the buffer 968@cindex temporary copy of the buffer
538@cindex Master file
539 969
540After the possibility of the syntax check has been determined, a 970After the possibility of the syntax check has been determined, a
541temporary copy of the current buffer is made so that the most recent 971temporary copy of the current buffer is made so that the most recent
@@ -547,9 +977,10 @@ Things get trickier, however, when master file is involved, as it
547requires to 977requires to
548 978
549@itemize @bullet 979@itemize @bullet
550@item locate a master file 980@item
551@item patch it to include the current file using its new (temporary) 981locate a master file
552name. 982@item
983patch it to include the current file using its new (temporary) name.
553@end itemize 984@end itemize
554 985
555Locating a master file is discussed in the following section. 986Locating a master file is discussed in the following section.
@@ -565,37 +996,39 @@ the syntax check tool.
565 996
566@node Locating a master file 997@node Locating a master file
567@section Locating a master file 998@section Locating a master file
568@cindex Master file 999@cindex locating a master file
1000@cindex master file, locating
569 1001
570Master file is located in two steps. 1002Master file is located in two steps.
571 1003
572First, a list of possible master files is built. A simple name 1004First, a list of possible master files is built. A simple name
573matching is used to find the files. For a C++ header @code{file.h}, 1005matching is used to find the files. For a C++ header @file{file.h},
574the Proc backend searches for all @code{.cpp} files in the directories 1006the Proc backend searches for all @file{.cpp} files in the directories
575whose relative paths are stored in a customizable variable 1007whose relative paths are stored in a customizable variable
576@code{flymake-proc-master-file-dirs}, which usually contains something 1008@code{flymake-proc-master-file-dirs}, which usually contains something
577like @code{("." "./src")}. No more than 1009like @code{("." "./src")}. No more than
578@code{flymake-proc-master-file-count-limit} entries is added to the 1010@code{flymake-proc-master-file-count-limit} entries is added to the
579master file list. The list is then sorted to move files with names 1011master file list. The list is then sorted to move files with names
580@code{file.cpp} to the top. 1012@file{file.cpp} to the top.
581 1013
582Next, each master file in a list is checked to contain the appropriate 1014Next, each master file in a list is checked to contain the appropriate
583include directives. No more than @code{flymake-proc-check-file-limit} of each 1015include directives. No more than @code{flymake-proc-check-file-limit} of each
584file are parsed. 1016file are parsed.
585 1017
586For @code{file.h}, the include directives to look for are 1018For @file{file.h}, the include directives to look for are
587@code{#include "file.h"}, @code{#include "../file.h"}, etc. Each 1019@code{#include "file.h"}, @code{#include "../file.h"}, etc. Each
588include is checked against a list of include directories 1020include is checked against a list of include directories
589(see @ref{Getting the include directories}) to be sure it points to the 1021(see @ref{Getting the include directories}) to be sure it points to the
590correct @code{file.h}. 1022correct @file{file.h}.
591 1023
592First matching master file found stops the search. The master file is then 1024First matching master file found stops the search. The master file is then
593patched and saved to disk. In case no master file is found, syntax check is 1025patched and saved to disk. In case no master file is found, syntax check is
594aborted, and corresponding status (!) is reported in the mode line. 1026aborted, and corresponding status (@samp{!}) is reported in the mode line.
1027@xref{Syntax check statuses}.
595 1028
596@node Getting the include directories 1029@node Getting the include directories
597@section Getting the include directories 1030@section Getting the include directories
598@cindex Include directories (C/C++ specific) 1031@cindex include directories (C/C++ specific)
599 1032
600Two sets of include directories are distinguished: system include directories 1033Two sets of include directories are distinguished: system include directories
601and project include directories. The former is just the contents of the 1034and project include directories. The former is just the contents of the
@@ -615,25 +1048,26 @@ of every syntax check attempt.
615 1048
616@node Locating the buildfile 1049@node Locating the buildfile
617@section Locating the buildfile 1050@section Locating the buildfile
618@cindex Locating the buildfile 1051@cindex locating the buildfile
619@cindex buildfile, locating 1052@cindex buildfile, locating
620@cindex Makefile, locating 1053@cindex Makefile, locating
621 1054
622The Proc backend can be configured to use different tools for 1055The Proc backend can be configured to use different tools for
623performing syntax checks. For example, it can use direct compiler 1056performing syntax checks. For example, it can use direct compiler
624call to syntax check a perl script or a call to @command{make} for a 1057call to syntax check a perl script or a call to @command{make} for a
625more complicated case of a @code{C/C++} source. The general idea is 1058more complicated case of a C/C@t{++} source. The general idea is
626that simple files, like perl scripts and html pages, can be checked by 1059that simple files, like Perl scripts and @acronym{HTML} pages, can be checked by
627directly invoking a corresponding tool. Files that are usually more 1060directly invoking a corresponding tool. Files that are usually more
628complex and generally used as part of larger projects, might require 1061complex and generally used as part of larger projects, might require
629non-trivial options to be passed to the syntax check tool, like 1062non-trivial options to be passed to the syntax check tool, like
630include directories for C++. The latter files are syntax checked 1063include directories for C@t{++}. The latter files are syntax checked
631using some build tool, like Make or Ant. 1064using some build tool, like Make or Ant.
632 1065
633All Make configuration data is usually stored in a file called 1066All Make configuration data is usually stored in a file called
634@code{Makefile}. To allow for future extensions, Flymake uses a notion of 1067@file{Makefile}. To allow for future extensions, Flymake uses a notion of
635buildfile to reference the 'project configuration' file. 1068buildfile to reference the @dfn{project configuration} file.
636 1069
1070@findex flymake-proc-find-buildfile
637Special function, @code{flymake-proc-find-buildfile} is provided for locating buildfiles. 1071Special function, @code{flymake-proc-find-buildfile} is provided for locating buildfiles.
638Searching for a buildfile is done in a manner similar to that of searching 1072Searching for a buildfile is done in a manner similar to that of searching
639for possible master files. 1073for possible master files.
@@ -642,13 +1076,13 @@ A customizable variable
642@code{flymake-proc-buildfile-dirs} holds a list of relative paths to the 1076@code{flymake-proc-buildfile-dirs} holds a list of relative paths to the
643buildfile. They are checked sequentially until a buildfile is found. 1077buildfile. They are checked sequentially until a buildfile is found.
644@end ignore 1078@end ignore
645In case there's no build file, syntax check is aborted. 1079In case there's no build file, the syntax check is aborted.
646 1080
647Buildfile values are also cached. 1081Buildfile values are also cached.
648 1082
649@node Starting the syntax check process 1083@node Starting the syntax check process
650@section Starting the syntax check process 1084@section Starting the syntax check process
651@cindex Syntax check process 1085@cindex syntax check process, legacy proc backend
652 1086
653The command line (command name and the list of arguments) for 1087The command line (command name and the list of arguments) for
654launching a process is returned by the initialization function. The 1088launching a process is returned by the initialization function. The
@@ -659,16 +1093,16 @@ be killed without prompting the user.
659 1093
660@node Parsing the output 1094@node Parsing the output
661@section Parsing the output 1095@section Parsing the output
662@cindex Parsing the output 1096@cindex parsing the output, legacy proc backend
663 1097
664The output generated by the syntax check tool is parsed in the process 1098The output generated by the syntax check tool is parsed in the process
665filter/sentinel using the error message patterns stored in the 1099filter/sentinel using the error message patterns stored in the
666@code{flymake-proc-err-line-patterns} variable. This variable contains a 1100@code{flymake-proc-err-line-patterns} variable. This variable contains a
667list of items of the form @code{(regexp file-idx line-idx 1101list of items of the form @w{@code{(regexp file-idx line-idx
668err-text-idx)}, used to determine whether a particular line is an 1102err-text-idx)}}, used to determine whether a particular line is an
669error message and extract file name, line number and error text, 1103error message and extract file name, line number and error text,
670respectively. Error type (error/warning) is also guessed by matching 1104respectively. Error type (error/warning) is also guessed by matching
671error text with the '@code{^[wW]arning}' pattern. Anything that was not 1105error text with the @samp{^[wW]arning} pattern. Anything that was not
672classified as a warning is considered an error. Type is then used to 1106classified as a warning is considered an error. Type is then used to
673sort error menu items, which shows error messages first. 1107sort error menu items, which shows error messages first.
674 1108
@@ -676,7 +1110,7 @@ The Proc backend is also able to interpret error message patterns
676missing err-text-idx information. This is done by merely taking the 1110missing err-text-idx information. This is done by merely taking the
677rest of the matched line (@code{(substring line (match-end 0))}) as 1111rest of the matched line (@code{(substring line (match-end 0))}) as
678error text. This trick allows making use of a huge collection of 1112error text. This trick allows making use of a huge collection of
679error message line patterns from @code{compile.el}. All these error 1113error message line patterns from @file{compile.el}. All these error
680patterns are appended to the end of 1114patterns are appended to the end of
681@code{flymake-proc-err-line-patterns}. 1115@code{flymake-proc-err-line-patterns}.
682 1116
@@ -687,8 +1121,8 @@ after every process launch/exit.
687 1121
688@node Interaction with other modes 1122@node Interaction with other modes
689@section Interaction with other modes 1123@section Interaction with other modes
690@cindex Interaction with other modes 1124@cindex interaction with other modes, legacy proc backend
691@cindex Interaction with compile mode 1125@cindex interaction with compile mode, legacy proc backend
692 1126
693The only mode the Proc backend currently knows about is 1127The only mode the Proc backend currently knows about is
694@code{compile}. 1128@code{compile}.
@@ -702,8 +1136,9 @@ though, was working around a locking problem with MS Visual C++
702compiler. The variable in question is 1136compiler. The variable in question is
703@code{flymake-proc-compilation-prevents-syntax-check}. 1137@code{flymake-proc-compilation-prevents-syntax-check}.
704 1138
1139@findex flymake-proc-compile
705The Proc backend also provides an alternative command for starting 1140The Proc backend also provides an alternative command for starting
706compilation, @code{flymake-proc-compile}. It just kills all the active 1141compilation, @code{flymake-proc-compile}. It just kills all the active
707syntax check processes before calling @code{compile}. 1142syntax check processes before calling @code{compile}.
708 1143
709@node GNU Free Documentation License 1144@node GNU Free Documentation License
diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi
index a04fa43a776..f7fe5392ce5 100644
--- a/doc/misc/htmlfontify.texi
+++ b/doc/misc/htmlfontify.texi
@@ -825,7 +825,7 @@ with a class of @code{t} is considered to match any class you specify.
825This matches Emacs's behavior when deciding on which face attributes to 825This matches Emacs's behavior when deciding on which face attributes to
826use, to the best of my understanding ). 826use, to the best of my understanding ).
827 827
828If @var{class} is @code{nil}, then you just get get whatever 828If @var{class} is @code{nil}, then you just get whatever
829@code{face-attr-construct} returns; i.e., the current specification in 829@code{face-attr-construct} returns; i.e., the current specification in
830effect for @var{face}. 830effect for @var{face}.
831 831
diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi
index fc79b027a1d..5f9a0f59721 100644
--- a/doc/misc/ses.texi
+++ b/doc/misc/ses.texi
@@ -584,7 +584,7 @@ This example will:
584When the cell is empty (ie.@: when @code{val} is @code{nil}), print an 584When the cell is empty (ie.@: when @code{val} is @code{nil}), print an
585empty string @code{""} 585empty string @code{""}
586@item 586@item
587When the cell value is a non negative number, format the the value in 587When the cell value is a non negative number, format the value in
588fixed-point notation with one decimal after point 588fixed-point notation with one decimal after point
589@item 589@item
590Otherwise, handle the value as erroneous by printing it as an 590Otherwise, handle the value as erroneous by printing it as an
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 6478479c38d..47055793b73 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -186,7 +186,7 @@ transparency extends to editing, version control, and @code{dired}.
186@value{tramp} can access remote hosts using any number of access 186@value{tramp} can access remote hosts using any number of access
187methods, such as @command{rsh}, @command{rlogin}, @command{telnet}, 187methods, such as @command{rsh}, @command{rlogin}, @command{telnet},
188and related programs. If these programs can successfully pass 188and related programs. If these programs can successfully pass
189@acronym{ASCII]} characters, @value{tramp} can use them. 189@acronym{ASCII} characters, @value{tramp} can use them.
190@value{tramp} does not require or mandate 8-bit clean connections. 190@value{tramp} does not require or mandate 8-bit clean connections.
191 191
192@value{tramp}'s most common access method is through @command{ssh}, a 192@value{tramp}'s most common access method is through @command{ssh}, a
@@ -339,8 +339,8 @@ Another way is to follow the terminal session below:
339 339
340@example 340@example
341@group 341@group
342] @strong{cd ~/emacs} 342$ cd ~/emacs
343] @strong{git clone git://git.savannah.gnu.org/tramp.git} 343$ git clone git://git.savannah.gnu.org/tramp.git
344@end group 344@end group
345@end example 345@end example
346 346
@@ -349,8 +349,8 @@ From behind a firewall:
349 349
350@example 350@example
351@group 351@group
352] @strong{git config --global http.proxy http://user:pwd@@proxy.server.com:8080} 352$ git config --global http.proxy http://user:pwd@@proxy.server.com:8080
353] @strong{git clone https://git.savannah.gnu.org/r/tramp.git} 353$ git clone https://git.savannah.gnu.org/r/tramp.git
354@end group 354@end group
355@end example 355@end example
356 356
@@ -358,7 +358,7 @@ From behind a firewall:
358@value{tramp} developers: 358@value{tramp} developers:
359 359
360@example 360@example
361] @strong{git clone login@@git.sv.gnu.org:/srv/git/tramp.git} 361$ git clone login@@git.sv.gnu.org:/srv/git/tramp.git
362@end example 362@end example
363 363
364@noindent 364@noindent
@@ -370,8 +370,8 @@ To fetch updates from the repository, use git pull:
370 370
371@example 371@example
372@group 372@group
373] @strong{cd ~/emacs/tramp} 373$ cd ~/emacs/tramp
374] @strong{git pull} 374$ git pull
375@end group 375@end group
376@end example 376@end example
377 377
@@ -381,8 +381,8 @@ Run @command{autoconf} as follows to generate an up-to-date
381 381
382@example 382@example
383@group 383@group
384] @strong{cd ~/emacs/tramp} 384$ cd ~/emacs/tramp
385] @strong{autoconf} 385$ autoconf
386@end group 386@end group
387@end example 387@end example
388 388
@@ -2000,7 +2000,7 @@ fi
2000install and execute a listener as follows (see @code{tramp-methods}): 2000install and execute a listener as follows (see @code{tramp-methods}):
2001 2001
2002@example 2002@example
2003# nc -l -p 42 2003$ nc -l -p 42
2004@end example 2004@end example
2005 2005
2006The above command-line syntax has changed with @command{busybox} 2006The above command-line syntax has changed with @command{busybox}