mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-06 12:19:37 +00:00
Don't print named tree-sitter nodes with parenthesizes (bug#60696)
* src/print.c (print_vectorlike): Use empty string as delimiters if the node is named.
This commit is contained in:
parent
e385c099b8
commit
aa9df1260c
1 changed files with 7 additions and 2 deletions
|
@ -2034,8 +2034,13 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
|
|||
/* Now the node must be up-to-date, and calling functions like
|
||||
Ftreesit_node_start will not signal. */
|
||||
bool named = treesit_named_node_p (XTS_NODE (obj)->node);
|
||||
const char *delim1 = named ? "(" : "\"";
|
||||
const char *delim2 = named ? ")" : "\"";
|
||||
/* We used to use () as delimiters for named nodes, but that
|
||||
confuses pretty-printing a tad bit. There might be more
|
||||
little breakages here and there if we print parenthesizes
|
||||
inside an object, so I guess better not do it.
|
||||
(bug#60696) */
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue