From: Yuan Fu Date: Fri, 28 Oct 2022 20:36:42 +0000 (-0700) Subject: ; Make ts-mode indent rules more compact (whitespace change) X-Git-Tag: emacs-29.0.90~1762 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0480e9c445d59fd5ec9b38ebe3919fee2aabf8d2;p=emacs.git ; Make ts-mode indent rules more compact (whitespace change) * lisp/progmodes/ts-mode.el (ts-mode--indent-rules): fold two-line rules into one line. --- diff --git a/lisp/progmodes/ts-mode.el b/lisp/progmodes/ts-mode.el index 1f0a7fd5c40..20118bc3db9 100644 --- a/lisp/progmodes/ts-mode.el +++ b/lisp/progmodes/ts-mode.el @@ -60,48 +60,29 @@ ((node-is ")") parent-bol 0) ((node-is "]") parent-bol 0) ((node-is ">") parent-bol 0) - ((parent-is "ternary_expression") - parent-bol ,ts-mode-indent-offset) - ((parent-is "member_expression") - parent-bol ,ts-mode-indent-offset) - ((parent-is "named_imports") - parent-bol ,ts-mode-indent-offset) - ((parent-is "statement_block") - parent-bol ,ts-mode-indent-offset) - ((parent-is "type_arguments") - parent-bol ,ts-mode-indent-offset) - ((parent-is "variable_declarator") - parent-bol ,ts-mode-indent-offset) - ((parent-is "arguments") - parent-bol ,ts-mode-indent-offset) - ((parent-is "array") - parent-bol ,ts-mode-indent-offset) - ((parent-is "formal_parameters") - parent-bol ,ts-mode-indent-offset) - ((parent-is "template_substitution") - parent-bol ,ts-mode-indent-offset) - ((parent-is "object_pattern") - parent-bol ,ts-mode-indent-offset) - ((parent-is "object") - parent-bol ,ts-mode-indent-offset) - ((parent-is "object_type") - parent-bol ,ts-mode-indent-offset) - ((parent-is "enum_body") - parent-bol ,ts-mode-indent-offset) - ((parent-is "arrow_function") - parent-bol ,ts-mode-indent-offset) - ((parent-is "parenthesized_expression") - parent-bol ,ts-mode-indent-offset) + ((parent-is "ternary_expression") parent-bol ,ts-mode-indent-offset) + ((parent-is "member_expression") parent-bol ,ts-mode-indent-offset) + ((parent-is "named_imports") parent-bol ,ts-mode-indent-offset) + ((parent-is "statement_block") parent-bol ,ts-mode-indent-offset) + ((parent-is "type_arguments") parent-bol ,ts-mode-indent-offset) + ((parent-is "variable_declarator") parent-bol ,ts-mode-indent-offset) + ((parent-is "arguments") parent-bol ,ts-mode-indent-offset) + ((parent-is "array") parent-bol ,ts-mode-indent-offset) + ((parent-is "formal_parameters") parent-bol ,ts-mode-indent-offset) + ((parent-is "template_substitution") parent-bol ,ts-mode-indent-offset) + ((parent-is "object_pattern") parent-bol ,ts-mode-indent-offset) + ((parent-is "object") parent-bol ,ts-mode-indent-offset) + ((parent-is "object_type") parent-bol ,ts-mode-indent-offset) + ((parent-is "enum_body") parent-bol ,ts-mode-indent-offset) + ((parent-is "arrow_function") parent-bol ,ts-mode-indent-offset) + ((parent-is "parenthesized_expression") parent-bol ,ts-mode-indent-offset) ;; TSX - ((parent-is "jsx_opening_element") - parent ,ts-mode-indent-offset) + ((parent-is "jsx_opening_element") parent ,ts-mode-indent-offset) ((node-is "jsx_closing_element") parent 0) - ((parent-is "jsx_element") - parent ,ts-mode-indent-offset) + ((parent-is "jsx_element") parent ,ts-mode-indent-offset) ((node-is "/") parent 0) - ((parent-is "jsx_self_closing_element") - parent ,ts-mode-indent-offset) + ((parent-is "jsx_self_closing_element") parent ,ts-mode-indent-offset) (no-node parent-bol 0))) "Tree-sitter indent rules.")