* Re: feature/tree-sitter 06db8015ea 1/5: Extract out treesit_make_ranges [not found] ` <20221115104926.4D491C0E4C8@vcs2.savannah.gnu.org> @ 2022-11-15 11:52 ` Po Lu 0 siblings, 0 replies; 6+ messages in thread From: Po Lu @ 2022-11-15 11:52 UTC (permalink / raw) To: emacs-devel; +Cc: Yuan Fu Yuan Fu <casouri@gmail.com> writes: > +/* Generate a list of ranges in Lisp from RANGES. This function > + doens't take ownership of RANGES. BUFFER is used to convert > + between tree-sitter buffer offset and buffer position. */ > +static Lisp_Object > +treesit_make_ranges (const TSRange *ranges, uint32_t len, > + struct buffer *buffer) > +{ > + Lisp_Object list = Qnil; > + for (int idx = 0; idx < len; idx++) > + { > + TSRange range = ranges[idx]; > + uint32_t beg_byte = range.start_byte + BUF_BEGV_BYTE (buffer); > + uint32_t end_byte = range.end_byte + BUF_BEGV_BYTE (buffer); > + eassert (BUF_BEGV_BYTE (buffer) <= beg_byte); > + eassert (beg_byte <= end_byte); > + eassert (end_byte <= BUF_ZV_BYTE (buffer)); > + > + Lisp_Object lisp_range > + = Fcons (make_fixnum (buf_bytepos_to_charpos (buffer, beg_byte)), > + make_fixnum (buf_bytepos_to_charpos (buffer, end_byte))); > + list = Fcons (lisp_range, list); > + } > + return Fnreverse (list); > + > +} There is a trailing newline after "return Fnreverse..." ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20221115104926.5143AC0E4CA@vcs2.savannah.gnu.org>]
* Re: feature/tree-sitter 34e50dc4a2 2/5: Allow tree-sitter to notify parse-tree changes [not found] ` <20221115104926.5143AC0E4CA@vcs2.savannah.gnu.org> @ 2022-11-15 11:54 ` Po Lu 2022-11-15 17:25 ` Yuan Fu 0 siblings, 1 reply; 6+ messages in thread From: Po Lu @ 2022-11-15 11:54 UTC (permalink / raw) To: emacs-devel; +Cc: Yuan Fu Yuan Fu <casouri@gmail.com> writes: > +static Lisp_Object > +treesit_make_ranges (const TSRange *, uint32_t, struct buffer *); This should be: static Lisp_Object treesit_make_ranges (const TSRange *, uint32_t, struct buffer *); > + Lisp_Object lisp_ranges = treesit_make_ranges(ranges, len, buf); There is a missing space between "treesit_make_ranges" and its parameters. > + FOR_EACH_TAIL (functions) > + safe_call2(XCAR (functions), lisp_ranges, parser); Here too, between safe_call2 and the parameters. > + treesit_call_after_change_functions(tree, new_tree, parser); And here. > +DEFUN ("treesit-parser-notifiers", > + Ftreesit_parser_notifiers, > + Streesit_parser_notifiers, > + > +DEFUN ("treesit-parser-add-notifier", > + Ftreesit_parser_add_notifier, > + Streesit_parser_add_notifier, > + > +DEFUN ("treesit-parser-remove-notifier", > + Ftreesit_parser_remove_notifier, > + Streesit_parser_remove_notifier, Can't you put all of these on one line? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: feature/tree-sitter 34e50dc4a2 2/5: Allow tree-sitter to notify parse-tree changes 2022-11-15 11:54 ` feature/tree-sitter 34e50dc4a2 2/5: Allow tree-sitter to notify parse-tree changes Po Lu @ 2022-11-15 17:25 ` Yuan Fu 2022-11-15 18:06 ` Eli Zaretskii 2022-11-15 18:06 ` Visuwesh 0 siblings, 2 replies; 6+ messages in thread From: Yuan Fu @ 2022-11-15 17:25 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > On Nov 15, 2022, at 3:54 AM, Po Lu <luangruo@yahoo.com> wrote: > > Yuan Fu <casouri@gmail.com> writes: > >> +static Lisp_Object >> +treesit_make_ranges (const TSRange *, uint32_t, struct buffer *); > > This should be: > > static Lisp_Object treesit_make_ranges (const TSRange *, uint32_t, > struct buffer *); > >> + Lisp_Object lisp_ranges = treesit_make_ranges(ranges, len, buf); > > There is a missing space between "treesit_make_ranges" and its > parameters. > >> + FOR_EACH_TAIL (functions) >> + safe_call2(XCAR (functions), lisp_ranges, parser); > > Here too, between safe_call2 and the parameters. > >> + treesit_call_after_change_functions(tree, new_tree, parser); > > And here. > >> +DEFUN ("treesit-parser-notifiers", >> + Ftreesit_parser_notifiers, >> + Streesit_parser_notifiers, > >> + >> +DEFUN ("treesit-parser-add-notifier", >> + Ftreesit_parser_add_notifier, >> + Streesit_parser_add_notifier, > >> + >> +DEFUN ("treesit-parser-remove-notifier", >> + Ftreesit_parser_remove_notifier, >> + Streesit_parser_remove_notifier, > > Can't you put all of these on one line? All fixed! Thanks. BTW how do you send an email like this, with the tile being the commit message and everything? Yuan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: feature/tree-sitter 34e50dc4a2 2/5: Allow tree-sitter to notify parse-tree changes 2022-11-15 17:25 ` Yuan Fu @ 2022-11-15 18:06 ` Eli Zaretskii 2022-11-15 18:06 ` Visuwesh 1 sibling, 0 replies; 6+ messages in thread From: Eli Zaretskii @ 2022-11-15 18:06 UTC (permalink / raw) To: Yuan Fu; +Cc: luangruo, emacs-devel > From: Yuan Fu <casouri@gmail.com> > Date: Tue, 15 Nov 2022 09:25:27 -0800 > Cc: emacs-devel@gnu.org > > BTW how do you send an email like this, with the tile being the commit message and everything? See https://lists.gnu.org/archive/html/emacs-diffs/2022-11/index.html. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: feature/tree-sitter 34e50dc4a2 2/5: Allow tree-sitter to notify parse-tree changes 2022-11-15 17:25 ` Yuan Fu 2022-11-15 18:06 ` Eli Zaretskii @ 2022-11-15 18:06 ` Visuwesh 2022-11-15 18:20 ` Yuan Fu 1 sibling, 1 reply; 6+ messages in thread From: Visuwesh @ 2022-11-15 18:06 UTC (permalink / raw) To: Yuan Fu; +Cc: Po Lu, emacs-devel [செவ்வாய் நவம்பர் 15, 2022] Yuan Fu wrote: > BTW how do you send an email like this, with the tile being the commit message and everything? I believe Po Lu follows emacs-diffs. All emacs-diffs messages have the subject as the commit summary and the entire commit in the body, and they have the mail headers set up so that the messaege is sent to the commit author whilst having emacs-devel in the CC's. > Yuan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: feature/tree-sitter 34e50dc4a2 2/5: Allow tree-sitter to notify parse-tree changes 2022-11-15 18:06 ` Visuwesh @ 2022-11-15 18:20 ` Yuan Fu 0 siblings, 0 replies; 6+ messages in thread From: Yuan Fu @ 2022-11-15 18:20 UTC (permalink / raw) To: Visuwesh; +Cc: Po Lu, emacs-devel >> From: Yuan Fu <casouri@gmail.com> >> Date: Tue, 15 Nov 2022 09:25:27 -0800 >> Cc: emacs-devel@gnu.org >> >> BTW how do you send an email like this, with the tile being the commit message and everything? > > See https://lists.gnu.org/archive/html/emacs-diffs/2022-11/index.html. > On Nov 15, 2022, at 10:06 AM, Visuwesh <visuweshm@gmail.com> wrote: > > [செவ்வாய் நவம்பர் 15, 2022] Yuan Fu wrote: > >> BTW how do you send an email like this, with the tile being the commit message and everything? > > I believe Po Lu follows emacs-diffs. All emacs-diffs messages have the > subject as the commit summary and the entire commit in the body, and > they have the mail headers set up so that the messaege is sent to the > commit author whilst having emacs-devel in the CC's. > >> Yuan Ahhh, how nice. Thanks to you both! Subscribing to yet one more emacs ML ;-) Yuan ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-15 18:20 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <166850936462.27011.17289179422833914249@vcs2.savannah.gnu.org> [not found] ` <20221115104926.4D491C0E4C8@vcs2.savannah.gnu.org> 2022-11-15 11:52 ` feature/tree-sitter 06db8015ea 1/5: Extract out treesit_make_ranges Po Lu [not found] ` <20221115104926.5143AC0E4CA@vcs2.savannah.gnu.org> 2022-11-15 11:54 ` feature/tree-sitter 34e50dc4a2 2/5: Allow tree-sitter to notify parse-tree changes Po Lu 2022-11-15 17:25 ` Yuan Fu 2022-11-15 18:06 ` Eli Zaretskii 2022-11-15 18:06 ` Visuwesh 2022-11-15 18:20 ` 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.