emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-30 87f41b937bc 2/2: Fix Ftreesit_parser_create


From: Yuan Fu
Subject: emacs-30 87f41b937bc 2/2: Fix Ftreesit_parser_create
Date: Sun, 21 Jul 2024 20:28:46 -0400 (EDT)

branch: emacs-30
commit 87f41b937bc06a14b3aeb12d5bf1a8b3e2ff74a1
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Fix Ftreesit_parser_create
    
    * src/treesit.c (Ftreesit_parser_create): Use the buffer given by the
    caller rather than the current buffer.
---
 src/treesit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/treesit.c b/src/treesit.c
index 416c1edf791..6e806039df0 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1450,7 +1450,9 @@ an indirect buffer.  */)
   ts_parser_set_language (parser, lang);
 
   /* Create parser.  */
-  Lisp_Object lisp_parser = make_treesit_parser (Fcurrent_buffer (),
+  Lisp_Object lisp_buf;
+  XSETBUFFER (lisp_buf, buf);
+  Lisp_Object lisp_parser = make_treesit_parser (lisp_buf,
                                                 parser, NULL,
                                                 language, tag);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]