[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 67c82710764 1/2: Improve namespacing situation WRT to recent ch
From: |
Dmitry Gutov |
Subject: |
emacs-29 67c82710764 1/2: Improve namespacing situation WRT to recent change in typescript-ts-mode.el |
Date: |
Sat, 16 Sep 2023 16:05:32 -0400 (EDT) |
branch: emacs-29
commit 67c82710764a5c09d713c340165a93c94750093f
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
Improve namespacing situation WRT to recent change in typescript-ts-mode.el
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts--syntax-propertize):
Rename from ts-ts--syntax-propertize.
(tsx-ts--syntax-propertize-captures):
Rename from ts-ts--syntax-propertize-captures.
(typescript-ts--s-p-query):
Rename from ts-ts--s-p-query.
Update all references (bug#65470).
---
lisp/progmodes/typescript-ts-mode.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/lisp/progmodes/typescript-ts-mode.el
b/lisp/progmodes/typescript-ts-mode.el
index e708e38195d..c92c072515e 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -421,7 +421,7 @@ Argument LANGUAGE is either `typescript' or `tsx'."
(keyword string escape-sequence)
(constant expression identifier number pattern property)
(function bracket delimiter)))
- (setq-local syntax-propertize-function #'ts-ts--syntax-propertize)
+ (setq-local syntax-propertize-function #'typescript-ts--syntax-propertize)
(treesit-major-mode-setup)))
@@ -472,7 +472,7 @@ at least 3 (which is the default value)."
(treesit-major-mode-setup)))
-(defvar ts-ts--s-p-query
+(defvar typescript-ts--s-p-query
(when (treesit-available-p)
(treesit-query-compile 'typescript
'(((regex pattern: (regex_pattern) @regexp))))))
@@ -487,15 +487,15 @@ at least 3 (which is the default value)."
((parenthesized_expression (jsx_element) @jsx))
((return_statement (jsx_element) @jsx))))))
-(defun ts-ts--syntax-propertize (beg end)
- (let ((captures (treesit-query-capture 'typescript ts-ts--s-p-query beg
end)))
- (ts-ts--syntax-propertize-captures captures)))
+(defun typescript-ts--syntax-propertize (beg end)
+ (let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query
beg end)))
+ (tsx-ts--syntax-propertize-captures captures)))
(defun tsx-ts--syntax-propertize (beg end)
(let ((captures (treesit-query-capture 'tsx tsx-ts--s-p-query beg end)))
- (ts-ts--syntax-propertize-captures captures)))
+ (tsx-ts--syntax-propertize-captures captures)))
-(defun ts-ts--syntax-propertize-captures (captures)
+(defun tsx-ts--syntax-propertize-captures (captures)
(pcase-dolist (`(,name . ,node) captures)
(let* ((ns (treesit-node-start node))
(ne (treesit-node-end node))