From: Yuan Fu Date: Sun, 25 Sep 2022 02:19:03 +0000 (-0700) Subject: Improve printing treesit nodes X-Git-Tag: emacs-29.0.90~1881 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=08a1c32d0bcaa9369a34e7f7d6d01c3885f62e21;p=emacs.git Improve printing treesit nodes * src/print.c (print_vectorlike): Instead of position, print the type of the node. --- diff --git a/src/print.c b/src/print.c index 12b50874359..4f41448d861 100644 --- a/src/print.c +++ b/src/print.c @@ -2024,12 +2024,15 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, printchar ('>', printcharfun); break; case PVEC_TS_NODE: - print_c_string ("#> or + #>. */ + print_c_string ("#node); + const char *delim1 = named ? "(" : "\""; + const char *delim2 = named ? ")" : "\""; + print_c_string (delim1, printcharfun); + print_string (Ftreesit_node_type (obj), printcharfun); + print_c_string (delim2, printcharfun); print_c_string (" in ", printcharfun); print_object (XTS_PARSER (XTS_NODE (obj)->parser)->buffer, printcharfun, escapeflag);