From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58430: 29.0.50; Silence js-mode byte-compilation warning Date: Tue, 11 Oct 2022 10:09:48 +0200 Message-ID: <87pmeyhjcj.fsf@thornhill.no> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1638"; mail-complaints-to="usenet@ciao.gmane.io" To: 58430@debbugs.gnu.org, casouri@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 11 10:35:39 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiAji-0000De-Ia for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 10:35:38 +0200 Original-Received: from localhost ([::1]:32896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiAjh-0000ub-Al for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 04:35:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiAKy-0000OV-Fx for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 04:10:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiAKy-0001zI-6K for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 04:10:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiAKx-0000Xh-Vq for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 04:10:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 08:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58430 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, casouri@gmail.com Original-Received: via spool by submit@debbugs.gnu.org id=B.16654758022073 (code B ref -1); Tue, 11 Oct 2022 08:10:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Oct 2022 08:10:02 +0000 Original-Received: from localhost ([127.0.0.1]:50791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiAKv-0000XI-U6 for submit@debbugs.gnu.org; Tue, 11 Oct 2022 04:10:02 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiAKp-0000Wz-CV for submit@debbugs.gnu.org; Tue, 11 Oct 2022 04:10:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiAKo-0000J2-Lf for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 04:09:55 -0400 Original-Received: from out0.migadu.com ([94.23.1.103]:62491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiAKl-0001oi-KI for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 04:09:53 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1665475789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=dKFFNoGY6MPlsY5nAOAeYiuSs50Y1Xs7+fL0kRDaRng=; b=D9Is29LoA0gXlZt3QYLVhFL0LrFk4eW6Vxe38xz9fbsDFy6Fgwrqy7uKdNCZiQuD/XK7Ov +NE2YN6mbxDCUniUWa11nTK3LytRN3Oer157dYap1H4A0ISsYIxoUZ6Xc+t6B4ZSC/k80g SzCBqOtdr2gj+YssUcGe+jMoNaPREBZrhhWiFwMps/El8ctUlOL6vAaOSu84ti7wBgj3y2 OKh4h998lvIn2JYvwCJZ8+msv9cVvU8hwyWBKGARs/t6ks1yjqIbiwwI3lAAkb7oOsqXe/ RVhZnqYhnxkjfjZwMEQ+sbCpNWPj6P+HxSigskv+U+dZulAD+eyr7n832YORDA== X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=94.23.1.103; envelope-from=theo@thornhill.no; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245093 Archived-At: --=-=-= Content-Type: text/plain Hi Yuan! Attached is a patch just to move the definition above its usage, to avoid byte-compilation warnings. Thanks! Theo P.S. How would you like to be addressed? Both names? It just seems to me I'll send more mails down the line ;) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Silence-js.el-byte-compilation-warning.patch >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 --=-=-=--