summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2024-03-30 04:38:18 -0400
committerEli Zaretskii <eliz@gnu.org>2024-03-30 04:38:18 -0400
commit87be53846bfbf5a6387cb5a40105bd0fc5b48b38 (patch)
treece7b0f367099f5188f96ae167787190b6ed1c03b
parent966ece247562086ef8a25ce9c985f583bb3c2822 (diff)
parent946d4aad1dfb244352dfd0845a8bc3078fe9bca4 (diff)
downloademacs-87be53846bfbf5a6387cb5a40105bd0fc5b48b38.tar.gz
Merge from origin/emacs-29
946d4aad1df Avoid errors in Info-search-case-sensitively in DIR buffers fbf68302999 Add test for previous change (bug#70023) bcf6dd6e266 Add typescript-ts-mode indentation for interface bodies (...
-rw-r--r--lisp/info.el2
-rw-r--r--lisp/progmodes/typescript-ts-mode.el1
-rw-r--r--test/lisp/progmodes/typescript-ts-mode-resources/indent.erts14
3 files changed, 16 insertions, 1 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 176bc9c0033..1e478cdbee9 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2174,7 +2174,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)
diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
index ea4f6417c5a..ab1d76ab20e 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)
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;
+}
+=-=-=