[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fc6f1f5: Fix doc of font-lock-syntactic-face-function
From: |
Lars Ingebrigtsen |
Subject: |
master fc6f1f5: Fix doc of font-lock-syntactic-face-function |
Date: |
Sun, 3 Nov 2019 11:20:40 -0500 (EST) |
branch: master
commit fc6f1f59fe6b49612cdc1963f9078d062b83fdc7
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Fix doc of font-lock-syntactic-face-function
* doc/lispref/modes.texi (Syntactic Font Lock): Don't refer to
no-longer-existing OTHER-VARS (bug#17730) and include an example.
---
doc/lispref/modes.texi | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index fda5a10..b7e5747 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3381,13 +3381,23 @@ Table Functions}).
@defvar font-lock-syntactic-face-function
If this variable is non-@code{nil}, it should be a function to determine
which face to use for a given syntactic element (a string or a comment).
-The value is normally set through an @var{other-vars} element in
-@code{font-lock-defaults}.
The function is called with one argument, the parse state at point
returned by @code{parse-partial-sexp}, and should return a face. The
default value returns @code{font-lock-comment-face} for comments and
-@code{font-lock-string-face} for strings (@pxref{Faces for Font Lock}).
+@code{font-lock-string-face} for strings (@pxref{Faces for Font
+Lock}).
+
+This variable is normally set through the ``other'' elements in
+@code{font-lock-defaults}:
+
+@lisp
+(setq-local font-lock-defaults
+ `(,python-font-lock-keywords
+ nil nil nil nil
+ (font-lock-syntactic-face-function
+ . python-font-lock-syntactic-face-function)))
+@end lisp
@end defvar
@node Multiline Font Lock
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master fc6f1f5: Fix doc of font-lock-syntactic-face-function,
Lars Ingebrigtsen <=