diff options
| author | Yuan Fu | 2024-12-19 19:02:59 -0800 |
|---|---|---|
| committer | Yuan Fu | 2024-12-20 00:53:00 -0800 |
| commit | 05ab13ebc7237bcf23bc84a6a345d0b563404c2d (patch) | |
| tree | 211873c7e284276828ea5ab98aa0feb8ef098b72 /doc | |
| parent | 926a9c864adc29f056644f5e23cf59fb90e2613c (diff) | |
| download | emacs-05ab13ebc7237bcf23bc84a6a345d0b563404c2d.tar.gz emacs-05ab13ebc7237bcf23bc84a6a345d0b563404c2d.zip | |
Add keyword :reversed to treesit-font-lock-rules
This keyword will be useful for implementing
string-interpolation feature.
* doc/lispref/modes.texi (Parser-based Font Lock): Document the
new keyword.
* lisp/treesit.el (treesit-font-lock-settings): Document.
(treesit-font-lock-setting-reversed): New function.
(treesit-font-lock-rules): Add new keyword.
(treesit-font-lock-recompute-features): Handle new keyword.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/modes.texi | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 2631769c51d..73edb688c85 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -4378,6 +4378,8 @@ Other keywords are optional: | |||
| 4378 | @item @tab @code{append} @tab Append the new face to existing ones | 4378 | @item @tab @code{append} @tab Append the new face to existing ones |
| 4379 | @item @tab @code{prepend} @tab Prepend the new face to existing ones | 4379 | @item @tab @code{prepend} @tab Prepend the new face to existing ones |
| 4380 | @item @tab @code{keep} @tab Fill-in regions without an existing face | 4380 | @item @tab @code{keep} @tab Fill-in regions without an existing face |
| 4381 | @item @code{:reversed} @tab @code{t} | ||
| 4382 | @tab Enable @var{query} when @var{feature} is not in the feature list. | ||
| 4381 | @item @code{:default-language} @tab @var{language} | 4383 | @item @code{:default-language} @tab @var{language} |
| 4382 | @tab Every @var{query} after this keyword will use @var{language} | 4384 | @tab Every @var{query} after this keyword will use @var{language} |
| 4383 | by default. | 4385 | by default. |
| @@ -4461,6 +4463,7 @@ For this variable to take effect, a Lisp program should call | |||
| 4461 | @findex treesit-font-lock-setting-feature | 4463 | @findex treesit-font-lock-setting-feature |
| 4462 | @findex treesit-font-lock-setting-enable | 4464 | @findex treesit-font-lock-setting-enable |
| 4463 | @findex treesit-font-lock-setting-override | 4465 | @findex treesit-font-lock-setting-override |
| 4466 | @findex treesit-font-lock-setting-reversed | ||
| 4464 | @defvar treesit-font-lock-settings | 4467 | @defvar treesit-font-lock-settings |
| 4465 | A list of settings for tree-sitter based font lock. The exact format of | 4468 | A list of settings for tree-sitter based font lock. The exact format of |
| 4466 | each individual setting is considered internal. One should always use | 4469 | each individual setting is considered internal. One should always use |
| @@ -4471,7 +4474,8 @@ the setting's query, feature, enable flag and override flag: | |||
| 4471 | @code{treesit-font-lock-setting-query}, | 4474 | @code{treesit-font-lock-setting-query}, |
| 4472 | @code{treesit-font-lock-setting-feature}, | 4475 | @code{treesit-font-lock-setting-feature}, |
| 4473 | @code{treesit-font-lock-setting-enable}, | 4476 | @code{treesit-font-lock-setting-enable}, |
| 4474 | @code{treesit-font-lock-setting-override}. | 4477 | @code{treesit-font-lock-setting-override}, |
| 4478 | @code{treesit-font-lock-setting-reversed}. | ||
| 4475 | 4479 | ||
| 4476 | @c Because the format is internal, we don't document them here. Though | 4480 | @c Because the format is internal, we don't document them here. Though |
| 4477 | @c we do have it explained in the docstring. We also expose the fact | 4481 | @c we do have it explained in the docstring. We also expose the fact |