diff options
author | Yuan Fu <casouri@gmail.com> | 2024-07-20 13:56:32 -0700 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2024-07-20 14:00:47 -0700 |
commit | 1abf3bdd7edcd405d4ccb4ef4de38068348f4b95 (patch) | |
tree | 2fdcc8436a77598caa4560f500fd87167fe0c9bc /lisp/emacs-lisp/regexp-opt.el | |
parent | 1eca867e1b60acef7f4343bc5c70340de58f1079 (diff) | |
download | emacs-1abf3bdd7edcd405d4ccb4ef4de38068348f4b95.tar.gz emacs-1abf3bdd7edcd405d4ccb4ef4de38068348f4b95.tar.bz2 emacs-1abf3bdd7edcd405d4ccb4ef4de38068348f4b95.zip |
Support dumping tree-sitter query (bug#69952)
Previous commit allows Emacs to dump tree-sitter queries by simply
dumping the query string and language symbol, and left the query object
and cursor object as NULL. This commit makes sure Emacs doesn't crash
when loading the dumped query, by make sure Emacs can handle the case
where the cursor is NULL.
* src/treesit.c (make_treesit_query): Initialize query with null cursor.
(treesit_ensure_query_cursor): New function.
(treesit_initialize_query): Ensure cursor is non-null.
* src/treesit.h (Lisp_TS_Query): Update documentation.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
0 files changed, 0 insertions, 0 deletions