[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Support for Font Lock in Proof General is described in the user manual
(see the Syntax highlighting section). To configure Font Lock for a
new proof assistant, you need to set the variable
font-lock-keywords
in each of the mode functions you want
highlighting for. Proof General will automatically install these
settings, and use font lock minor mode (for syntax highlighting as you
type) in script buffers.
To understand its format, check the documentation of
font-lock-keywords
inside Emacs.
Instead of setting font-lock-keywords
in each mode function, you
can use the following four variables to make the settings in place.
This is particularly useful if use the easy configuration mechanism for
Proof General, see section 1.2 Demonstration instance and easy configuration.
font-lock-keywords
used to fontify proof scripts.proof-easy-config
mechanism,
to set font-lock-keywords
before calling proof-config-done
.
See also proof-{shell,resp,goals}-font-lock-keywords
.
font-lock-keywords
used to fontify the proof shell.proof-easy-config
mechanism, to set
`font-lock-keywords
' before calling `proof-config-done
'.
See also proof-{script,resp,goals}-font-lock-keywords
.
font-lock-keywords
used to fontify the goals output.font-lock-mode
because the
fontification may rely on annotations which are erased before
displaying. This means internal functions of PG must be used
to display to the goals buffer to ensure fontification is done!
This is currently used only by proof-easy-config
mechanism,
to set font-lock-keywords
before calling proof-config-done
.
See also proof-{script,shell,resp}-font-lock-keywords
.
font-lock-keywords
used to fontify the response output.font-lock-mode
because the
fontification may rely on annotations which are erased before
displaying. This means internal functions of PG must be used
to display to the goals buffer to ensure fontification is done!
This is currently used only by proof-easy-config
mechanism,
to set font-lock-keywords
before calling proof-config-done
.
See also proof-{script,shell,resp}-font-lock-keywords
.
proof-zap-commas
, for
tweaking the font lock behaviour of provers which have declarations of
the form x,y,z:Ty
. This function removes highlighting on the
commas, and can be added as the last element of
font-lock-keywords
. Further manipulation of font lock behaviour
can be achieved via two hook functions which are run before and after
fontifying the output buffers.
font-lock-keywords
'.
point-max
).
[This hook is presently only used by phox-sym-lock].
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |