emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 140e7f8: Recommend using font-lock-face over face


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 140e7f8: Recommend using font-lock-face over face (Bug#35044)
Date: Sun, 28 Apr 2019 17:21:42 -0400 (EDT)

branch: emacs-26
commit 140e7f890fa94f8b6381dfa3e0682cacfa92a593
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Recommend using font-lock-face over face (Bug#35044)
    
    * doc/lispref/modes.texi (Precalculated Fontification): Explain
    advantages of using font-lock-face over face.
---
 doc/lispref/modes.texi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 919816f..0ff13d7 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -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
address@hidden
address@hidden  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
address@hidden, 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]