all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 58430@debbugs.gnu.org, casouri@gmail.com
Subject: bug#58430: 29.0.50; Silence js-mode byte-compilation warning
Date: Tue, 11 Oct 2022 10:09:48 +0200	[thread overview]
Message-ID: <87pmeyhjcj.fsf@thornhill.no> (raw)

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]


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 ;)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Silence-js.el-byte-compilation-warning.patch --]
[-- Type: text/x-diff, Size: 1595 bytes --]

From a9afd28d38512bf06e52cb1e15856728f6c3fdbe Mon Sep 17 00:00:00 2001
From: Theodor Thornhill <theo@thornhill.no>
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


             reply	other threads:[~2022-10-11  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11  8:09 Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-10-11 18:52 ` bug#58430: 29.0.50; Silence js-mode byte-compilation warning Yuan Fu
2022-10-11 20:03 ` Yuan Fu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmeyhjcj.fsf@thornhill.no \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58430@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=theo@thornhill.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.