warning-prefix-function

warning-prefix-function is a variable defined in `warnings.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Function to generate warning prefixes.
This function, if non-nil, is called with two arguments,
the severity level and its entry in `warning-levels',
and should return the entry that should actually be used.
The warnings buffer is current when this function is called
and the function can insert text in it. This text becomes
the beginning of the warning.