>From a9afd28d38512bf06e52cb1e15856728f6c3fdbe Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Tue, 11 Oct 2022 10:03:33 +0200 Subject: [PATCH] Silence js.el byte-compilation warning --- lisp/progmodes/js.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index d831a6cf7a..1b82e204b9 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3582,6 +3582,14 @@ js-treesit-current-defun do (setq node (treesit-node-parent node)) finally return (string-join name-list ".")))) +(defvar js--treesit-defun-type-regexp + (rx (or "class_declaration" + "method_definition" + "function_declaration" + "lexical_declaration")) + "Regular expression that matches type of defun nodes. +Used in `js--treesit-beginning-of-defun' and friends.") + (defun js--treesit-beginning-of-defun (&optional arg) "Tree-sitter `beginning-of-defun' function. ARG is the same as in `beginning-of-defun." @@ -3614,14 +3622,6 @@ js--treesit-end-of-defun js--treesit-defun-type-regexp 'end)) (setq arg (1- arg)))))) -(defvar js--treesit-defun-type-regexp - (rx (or "class_declaration" - "method_definition" - "function_declaration" - "lexical_declaration")) - "Regular expression that matches type of defun nodes. -Used in `js--treesit-beginning-of-defun' and friends.") - (defun js--treesit-can-enable-p () (if (and js-use-tree-sitter (treesit-can-enable-p) -- 2.34.1