Programs can customize how their warnings appear by binding the variables described in this section.
This list defines the meaning and severity order of the warning severity levels. Each element defines one severity level, and they are arranged in order of decreasing severity.
Each element has the form
function), where level is the severity level it defines.
string specifies the textual description of this level.
string should use ‘%s’ to specify where to put the warning
type information, or it can omit the ‘%s’ so as not to include
The optional function, if non-
nil, is a function to call
with no arguments, to get the user’s attention.
Normally you should not change the value of this variable.
nil, the value is a function to generate prefix text for
warnings. Programs can bind the variable to a suitable function.
display-warning calls this function with the warnings buffer
current, and the function can insert text in it. That text becomes
the beginning of the warning message.
The function is called with two arguments, the severity level and its
warning-levels. It should return a list to use as the
entry (this value need not be an actual member of
warning-levels). By constructing this value, the function can
change the severity of the warning, or specify different handling for
a given severity level.
If the variable’s value is
nil then there is no function
Programs can bind this variable to
t to say that the next
warning should begin a series. When several warnings form a series,
that means to leave point on the first warning of the series, rather
than keep moving it for each warning so that it appears on the last one.
The series ends when the local binding is unbound and
The value can also be a symbol with a function definition. That is
t, except that the next warning will also call
the function with no arguments with the warnings buffer current. The
function can insert text which will serve as a header for the series
Once a series has begun, the value is a marker which points to the buffer position in the warnings buffer of the start of the series.
The variable’s normal value is
nil, which means to handle
each warning separately.
When this variable is non-
nil, it specifies a fill prefix to
use for filling each warning’s text.
The column at which to fill warnings.
This variable specifies the format for displaying the warning type
in the warning message. The result of formatting the type this way
gets included in the message under the control of the string in the
warning-levels. The default value is
If you bind it to
"" then the warning type won’t appear at