unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Emacs development discussions." <emacs-devel@gnu.org>
To: emacs-devel@gnu.org
Subject: treesit.c sectioning
Date: Fri, 10 Feb 2023 23:19:30 +0800	[thread overview]
Message-ID: <87cz6h35vh.fsf@yahoo.com> (raw)
In-Reply-To: 87cz6h35vh.fsf.ref@yahoo.com

Are there really only two parts, ``initialization'' and ``loading
language libraries'' in treesit.c?

If not, will anyone object to:

2023-02-10  Po Lu  <luangruo@yahoo.com>

	* src/treesit.c: Improve sectioning.

diff --git a/src/treesit.c b/src/treesit.c
index cfa3721b5e7..6ce7e2319d9 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -720,6 +720,7 @@ DEFUN ("treesit-language-abi-version", Ftreesit_language_abi_version,
     }
 }
 
+\f
 /*** Parsing functions */
 
 static void
@@ -1104,6 +1105,7 @@ treesit_read_buffer (void *parser, uint32_t byte_index,
   return beg;
 }
 
+\f
 /*** Functions for parser and node object */
 
 /* Wrap the parser in a Lisp_Object to be used in the Lisp
@@ -1266,6 +1268,9 @@ treesit_ensure_query_compiled (Lisp_Object query, Lisp_Object *signal_symbol,
   return treesit_query;
 }
 
+\f
+/* Lisp definitions.  */
+
 DEFUN ("treesit-parser-p",
        Ftreesit_parser_p, Streesit_parser_p, 1, 1, 0,
        doc: /* Return t if OBJECT is a tree-sitter parser.  */)
@@ -1475,6 +1480,7 @@ DEFUN ("treesit-parser-language",
   return XTS_PARSER (parser)->language_symbol;
 }
 
+\f
 /*** Parser API */
 
 DEFUN ("treesit-parser-root-node",
@@ -1721,6 +1727,7 @@ DEFUN ("treesit-parser-remove-notifier", Ftreesit_parser_remove_notifier,
   return Qnil;
 }
 
+\f
 /*** Node API  */
 
 /* Check that OBJ is a positive integer and signal an error if
@@ -2237,6 +2244,7 @@ DEFUN ("treesit-node-eq",
   return same_node ? Qt : Qnil;
 }
 
+\f
 /*** Query functions */
 
 DEFUN ("treesit-pattern-expand",
@@ -2811,6 +2819,7 @@ DEFUN ("treesit-query-capture",
   return Fnreverse (result);
 }
 
+\f
 /*** Navigation */
 
 static inline void
@@ -3431,7 +3440,7 @@ DEFUN ("treesit-available-p", Ftreesit_available_p,
 #endif
 }
 
-
+\f
 /*** Initialization */
 
 /* Initialize the tree-sitter routines.  */



       reply	other threads:[~2023-02-10 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87cz6h35vh.fsf.ref@yahoo.com>
2023-02-10 15:19 ` Po Lu via Emacs development discussions. [this message]
2023-02-10 16:55   ` treesit.c sectioning Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87cz6h35vh.fsf@yahoo.com \
    --to=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).