mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
The direct cause of the problem in the bug report is that when user runs treesit-font-lock-recompute-features to add the emacs-devel feature in c-ts-mode's mode hook, the added query for emacs-devel aren't compiled. This change consists of two parts: 1. The immediate fix: validate and compile queries in treesit-font-lock-recompute-features. 2. To make it more fool-proof, change treesit-font-lock-rules back to compile the queries and make treesit--compile-query-with-cache support compiled queries. This way, as long as the query goes through treesit-font-lock-rules, it'll be compiled eventually and not cause slow-down. I had to add some c-level functions, but they're kind of overdue anyway, so I don't have any problem adding them to the API. * lisp/treesit.el (treesit--compile-query-with-cache): Support compiled queries. (treesit-font-lock-rules): Compile the queries (but not eagerly). (treesit-font-lock-recompute-features): Validate and compile queries. (treesit-major-mode-setup): Remove call to treesit-validate-and-compile-font-lock-rules since it's now called in treesit-font-lock-recompute-features. * src/treesit.c (Ftreesit_query_eagerly_compiled_p): (Ftreesit_query_source): New functions. * doc/lispref/parsing.texi (Pattern Matching): Add manual entries for the new functions. |
||
|---|---|---|
| .. | ||
| charsets | ||
| e | ||
| forms | ||
| gnus | ||
| images | ||
| nxml | ||
| org | ||
| refcards | ||
| schema | ||
| srecode | ||
| themes | ||
| tutorials | ||
| AUTHORS | ||
| CALC-NEWS | ||
| ChangeLog.1 | ||
| compilation.txt | ||
| COPYING | ||
| copyright-assign.txt | ||
| DEBUG | ||
| DEVEL.HUMOR | ||
| DISTRIB | ||
| edt-user.el | ||
| EGLOT-NEWS | ||
| emacs-buffer.gdb | ||
| emacs-mail.desktop | ||
| emacs.desktop | ||
| emacs.icon | ||
| emacs.metainfo.xml | ||
| emacs.service | ||
| emacs_lldb.py | ||
| emacsclient-mail.desktop | ||
| emacsclient.desktop | ||
| enriched.txt | ||
| ERC-NEWS | ||
| ETAGS.EBNF | ||
| ETAGS.README | ||
| future-bug | ||
| gnus-tut.txt | ||
| grep.txt | ||
| HELLO | ||
| HISTORY | ||
| JOKES | ||
| MACHINES | ||
| MH-E-NEWS | ||
| NEWS | ||
| NEWS.1-17 | ||
| NEWS.18 | ||
| NEWS.19 | ||
| NEWS.20 | ||
| NEWS.21 | ||
| NEWS.22 | ||
| NEWS.23 | ||
| NEWS.24 | ||
| NEWS.25 | ||
| NEWS.26 | ||
| NEWS.27 | ||
| NEWS.28 | ||
| NEWS.29 | ||
| NEWS.30 | ||
| NEXTSTEP | ||
| NXML-NEWS | ||
| ORG-NEWS | ||
| org.gnu.emacs.defaults.gschema.xml | ||
| package-keyring.gpg | ||
| PROBLEMS | ||
| ps-prin0.ps | ||
| ps-prin1.ps | ||
| publicsuffix.txt | ||
| README | ||
| rgb.txt | ||
| ses-example.ses | ||
| spook.lines | ||
| symbol-releases.eld | ||
| TERMS | ||
| TODO | ||
| w32-feature.el | ||
This directory contains the architecture-independent files used by or with Emacs. This includes some text files of documentation for GNU Emacs or of interest to Emacs users, and the file of dumped docstrings for Emacs functions and variables. COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES File: emacs.icon Author: Sun Microsystems, Inc Copyright (C) 1999, 2001-2026 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING)