all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#58430: 29.0.50; Silence js-mode byte-compilation warning
@ 2022-10-11  8:09 Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-11 18:52 ` Yuan Fu
  2022-10-11 20:03 ` Yuan Fu
  0 siblings, 2 replies; 3+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-11  8:09 UTC (permalink / raw)
  To: 58430, casouri

[-- 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#58430: 29.0.50; Silence js-mode byte-compilation warning
  2022-10-11  8:09 bug#58430: 29.0.50; Silence js-mode byte-compilation warning Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-11 18:52 ` Yuan Fu
  2022-10-11 20:03 ` Yuan Fu
  1 sibling, 0 replies; 3+ messages in thread
From: Yuan Fu @ 2022-10-11 18:52 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: 58430


Theodor Thornhill <theo@thornhill.no> writes:

> Hi Yuan!
>
> Attached is a patch just to move the definition above its usage, to
> avoid byte-compilation warnings.

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

I like to be called “Yuan”, thanks for asking :-)

Yuan





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#58430: 29.0.50; Silence js-mode byte-compilation warning
  2022-10-11  8:09 bug#58430: 29.0.50; Silence js-mode byte-compilation warning Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-11 18:52 ` Yuan Fu
@ 2022-10-11 20:03 ` Yuan Fu
  1 sibling, 0 replies; 3+ messages in thread
From: Yuan Fu @ 2022-10-11 20:03 UTC (permalink / raw)
  To: 58430-done







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-11 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-11  8:09 bug#58430: 29.0.50; Silence js-mode byte-compilation warning Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-11 18:52 ` Yuan Fu
2022-10-11 20:03 ` Yuan Fu

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.