From bcf6dd6e266222a293e359430afdf3a2dc18369c Mon Sep 17 00:00:00 2001 From: Noah Peart Date: Tue, 26 Mar 2024 22:44:48 -0700 Subject: Add typescript-ts-mode indentation for interface bodies (bug#70023) * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules): Add indentation rule for interface bodies. --- lisp/progmodes/typescript-ts-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 7021f012dcd..9c4c388c6b1 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -124,6 +124,7 @@ Argument LANGUAGE is either `typescript' or `tsx'." ((parent-is "object_type") parent-bol typescript-ts-mode-indent-offset) ((parent-is "enum_body") parent-bol typescript-ts-mode-indent-offset) ((parent-is "class_body") parent-bol typescript-ts-mode-indent-offset) + ((parent-is "interface_body") parent-bol typescript-ts-mode-indent-offset) ((parent-is "arrow_function") parent-bol typescript-ts-mode-indent-offset) ((parent-is "parenthesized_expression") parent-bol typescript-ts-mode-indent-offset) ((parent-is "binary_expression") parent-bol typescript-ts-mode-indent-offset) -- cgit v1.2.3 From fbf6830299998a1e99b99c69cb90b637a3d26f12 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Thu, 28 Mar 2024 19:02:09 +0100 Subject: Add test for previous change (bug#70023) * test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: Add test. --- .../progmodes/typescript-ts-mode-resources/indent.erts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts index 7b6185e0386..bec96ad82e0 100644 --- a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts @@ -110,3 +110,17 @@ const foo = (props) => { ); } =-=-= + +Name: Interface body fields are indented + +=-= +interface Foo { +foo: string; +bar?: boolean; +} +=-= +interface Foo { + foo: string; + bar?: boolean; +} +=-=-= -- cgit v1.2.3 From 946d4aad1dfb244352dfd0845a8bc3078fe9bca4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Mar 2024 10:00:02 +0300 Subject: Avoid errors in Info-search-case-sensitively in DIR buffers * lisp/info.el (Info-search): Don't run the "try other subfiles" code if there are no subfiles. This happens, for example, in DIR files. (Bug#70058) --- lisp/info.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/info.el b/lisp/info.el index 1c6df9a6ee5..5817737ca92 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2056,7 +2056,7 @@ If DIRECTION is `backward', search in the reverse direction." (re-search-forward regexp nil t)) (signal 'user-search-failed (list regexp)))))) - (if (and bound (not found)) + (if (and (or bound (not Info-current-subfile)) (not found)) (signal 'user-search-failed (list regexp))) (unless (or found bound) -- cgit v1.2.3