[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 bcf287bd114 2/2: typescript-ts-mode.el: Minor touches
From: |
Dmitry Gutov |
Subject: |
emacs-29 bcf287bd114 2/2: typescript-ts-mode.el: Minor touches |
Date: |
Sat, 16 Sep 2023 16:05:32 -0400 (EDT) |
branch: emacs-29
commit bcf287bd11405b21033466cf0284653e45b54be7
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
typescript-ts-mode.el: Minor touches
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--indent-compatibility-b893426)
(tsx-ts-mode--font-lock-compatibility-bb1f97b):
Catch specific error.
(typescript-ts-base-mode): Improve docstring (bug#65470).
---
lisp/progmodes/typescript-ts-mode.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/typescript-ts-mode.el
b/lisp/progmodes/typescript-ts-mode.el
index c92c072515e..709d3718a0a 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -87,7 +87,7 @@ Check if a node type is available, then return the right
indent rules."
(progn (treesit-query-capture 'tsx '((jsx_fragment) @capture))
`(((match "<" "jsx_fragment") parent 0)
((parent-is "jsx_fragment") parent
typescript-ts-mode-indent-offset)))
- (error
+ (treesit-query-error
`(((match "<" "jsx_text") parent 0)
((parent-is "jsx_text") parent typescript-ts-mode-indent-offset)))))
@@ -178,7 +178,8 @@ Argument LANGUAGE is either `typescript' or `tsx'."
(jsx_self_closing_element
[(member_expression (identifier)) (identifier)]
@typescript-ts-jsx-tag-face)))
- (error '((jsx_opening_element
+ (treesit-query-error
+ '((jsx_opening_element
[(nested_identifier (identifier)) (identifier)]
@typescript-ts-jsx-tag-face)
@@ -370,7 +371,9 @@ Argument LANGUAGE is either `typescript' or `tsx'."
;;;###autoload
(define-derived-mode typescript-ts-base-mode prog-mode "TypeScript"
- "Major mode for editing TypeScript."
+ "Generic major mode for editing TypeScript.
+
+This mode is intended to be inherited by concrete major modes."
:group 'typescript
:syntax-table typescript-ts-mode--syntax-table