diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-12-30 06:45:13 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-12-30 06:45:13 +0100 |
commit | 89e7bb230d643b3619d7e2ed6855c35184032542 (patch) | |
tree | f1e15d573766c8678df581afba91475a4059eda1 /lisp/progmodes/js.el | |
parent | 9153cf8158489d387a6a0d9d0ede9a2528c35f0a (diff) | |
parent | 644c71d6788d268cb065bd9317efb8a16a8236e6 (diff) | |
download | emacs-89e7bb230d643b3619d7e2ed6855c35184032542.tar.gz |
Merge from origin/emacs-29
644c71d6788 lisp/textmodes/bibtex.el: fix bibtex-beginning-of-entry (...
ab38abfdf75 lisp/textmodes/bibtex.el: Treat $ as punctuation in BibTe...
d086cd6cf87 Clarify the documentation of 'set-face-attribute'
dafa6d6badd Handle non-string values in pcomplete
beed746f944 Fix completion when completion-auto-select is set
7ccb88486eb ; * etc/DEBUG: Update MS-Windows specifics for GDB 13 and...
558b59d81b9 Add color fontification in css-ts-mode (bug#60405)
a96a7c81151 ; * lisp/textmodes/css-mode.el (css-ts-mode): Fix imenu s...
793641a3db5 ; * lisp/progmodes/js.el: Fix byte-compile warning.
0aea1cf8190 * lisp/hi-lock.el (hi-lock--regexps-at-point): Fix bug (b...
60418e6f09c * src/keyboard.c (echo_add_key): Use recently rebound C-h...
706ed852855 Avoid assertion violations in treesit.c with --enable-che...
38c35bf0f6a Clean up treesit-default-defun-skipper and add comments
9371d488be6 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
9d814bea460 ; whitespace.el: Use the new 'ert-with-buffer-selected' i...
784e509bded Fix c-ts-mode bracket indentation (bug#60398)
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r-- | lisp/progmodes/js.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 79b7e74ec41..9c26c52df94 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -74,6 +74,8 @@ (declare-function treesit-node-start "treesit.c") (declare-function treesit-node-end "treesit.c") (declare-function treesit-node-type "treesit.c") +(declare-function treesit-query-compile "treesit.c") +(declare-function treesit-query-capture "treesit.c") ;;; Constants @@ -3642,8 +3644,9 @@ OVERRIDE is the override flag described in "call_expression"))) (defvar js--treesit-lhs-identifier-query - (treesit-query-compile 'javascript '((identifier) @id - (property_identifier) @id)) + (when (treesit-available-p) + (treesit-query-compile 'javascript '((identifier) @id + (property_identifier) @id))) "Query that captures identifier and query_identifier.") (defun js--treesit-fontify-assignment-lhs (node override start end &rest _) |