From: Yuan Fu Date: Sat, 20 May 2023 07:45:39 +0000 (-0700) Subject: Fix c-ts-mode--top-level-declarator X-Git-Tag: emacs-29.0.92~128 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cec9333dc52;p=emacs.git Fix c-ts-mode--top-level-declarator * lisp/progmodes/c-ts-mode.el: (c-ts-mode--top-level-declarator): Don't use treesit-node-match-p. --- diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 7a57d5adeb1..c6cb9520e58 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -767,7 +767,7 @@ For NODE, OVERRIDE, START, END, and ARGS, see ;; more cases. (let* ((parent (treesit-node-parent node)) (grandparent (treesit-node-parent parent))) - (and (treesit-node-match-p parent "ERROR") + (and (equal (treesit-node-type parent) "ERROR") (null grandparent)))) (defun c-ts-mode--fontify-variable (node override start end &rest _)