boot/messages.pl, default_theme/2.
Besides the classes used for messages (code, comment, var,
warning, error, truth(Truth), port(Port), message(Kind),
...), the interactive toplevel uses these:
- prompt
- The
?-prompt and its ‘|‘ continuation. - input
- The text typed by the user at the prompt.
- answer(Parity)
- An answer written by the toplevel. Parity is
oddorevenand alternates over the answers of a single query, which allows for striping the answers using a background color. Only an answer that shows bindings, residual goals or delays uses this class:true.andfalse.are not answers to stripe, and neither is the empty line that separates the answer from the next query. - binding(name)
- The variable name in a binding such as
X = 1.
The debugger uses, besides frame(level) and port(Port):
- goal(Port, Parity)
- The goal of a frame reported for Port. Parity is
oddorevenand alternates over the steps of a trace, which allows for striping the goals using a background color. Match on Port to color the goal by port instead of (or in addition to) striping.
Note that a background color on prompt, input
or answer(_) is painted up to the right margin using ‘\e[K`.
A background on
goal(_,_) is not: the debugger writes its ?
prompt on the same line.
If Theme does not define Term, the theme it is based on is used (see prolog:theme_base/2).
- See also
library(theme/dark)for an example implementation and the Term values used by the system messages.