diff options
| author | Lars Ingebrigtsen | 2019-11-03 17:19:26 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-11-03 17:20:35 +0100 |
| commit | fc6f1f59fe6b49612cdc1963f9078d062b83fdc7 (patch) | |
| tree | ec7ca1f27d27fb5249c79929f90af7c8b00b956e | |
| parent | 2ad06e28e34924bdb08df9cf9e385ab4451c1274 (diff) | |
| download | emacs-fc6f1f59fe6b49612cdc1963f9078d062b83fdc7.tar.gz emacs-fc6f1f59fe6b49612cdc1963f9078d062b83fdc7.zip | |
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.
| -rw-r--r-- | doc/lispref/modes.texi | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index fda5a106bbe..b7e574740ab 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -3381,13 +3381,23 @@ Table Functions}). | |||
| 3381 | @defvar font-lock-syntactic-face-function | 3381 | @defvar font-lock-syntactic-face-function |
| 3382 | If this variable is non-@code{nil}, it should be a function to determine | 3382 | If this variable is non-@code{nil}, it should be a function to determine |
| 3383 | which face to use for a given syntactic element (a string or a comment). | 3383 | which face to use for a given syntactic element (a string or a comment). |
| 3384 | The value is normally set through an @var{other-vars} element in | ||
| 3385 | @code{font-lock-defaults}. | ||
| 3386 | 3384 | ||
| 3387 | The function is called with one argument, the parse state at point | 3385 | The function is called with one argument, the parse state at point |
| 3388 | returned by @code{parse-partial-sexp}, and should return a face. The | 3386 | returned by @code{parse-partial-sexp}, and should return a face. The |
| 3389 | default value returns @code{font-lock-comment-face} for comments and | 3387 | default value returns @code{font-lock-comment-face} for comments and |
| 3390 | @code{font-lock-string-face} for strings (@pxref{Faces for Font Lock}). | 3388 | @code{font-lock-string-face} for strings (@pxref{Faces for Font |
| 3389 | Lock}). | ||
| 3390 | |||
| 3391 | This variable is normally set through the ``other'' elements in | ||
| 3392 | @code{font-lock-defaults}: | ||
| 3393 | |||
| 3394 | @lisp | ||
| 3395 | (setq-local font-lock-defaults | ||
| 3396 | `(,python-font-lock-keywords | ||
| 3397 | nil nil nil nil | ||
| 3398 | (font-lock-syntactic-face-function | ||
| 3399 | . python-font-lock-syntactic-face-function))) | ||
| 3400 | @end lisp | ||
| 3391 | @end defvar | 3401 | @end defvar |
| 3392 | 3402 | ||
| 3393 | @node Multiline Font Lock | 3403 | @node Multiline Font Lock |