Commit 140e7f89 authored by Noam Postavsky's avatar Noam Postavsky

Recommend using font-lock-face over face (Bug#35044)

* doc/lispref/modes.texi (Precalculated Fontification): Explain
advantages of using font-lock-face over face.
parent 7cb5364e
Pipeline #1494 passed with stage
in 26 minutes and 47 seconds
......@@ -3201,7 +3201,12 @@ is disabled, @code{font-lock-face} has no effect on the display.
It is ok for a mode to use @code{font-lock-face} for some text and
also use the normal Font Lock machinery. But if the mode does not use
the normal Font Lock machinery, it should not set the variable
@code{font-lock-defaults}. In this case the @code{face} property will
not be overriden, so using the @code{face} property could work too.
However, using @code{font-lock-face} is generally preferable as it
allows the user to control the fontification by toggling
@code{font-lock-mode}, and lets the code work regardless of whether
the mode uses Font Lock machinery or not.
@node Faces for Font Lock
@subsection Faces for Font Lock
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment