summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2022-12-01 18:57:54 -0800
committerYuan Fu <casouri@gmail.com>2022-12-01 19:59:51 -0800
commit16e68e64f924e99d0ad823dcfa9f7b7cc8975b50 (patch)
tree64fe23e65724fdf737b713bf00fa91871294562c
parent3bccef6f52598dd5aea37016254a3bc17893298d (diff)
downloademacs-16e68e64f924e99d0ad823dcfa9f7b7cc8975b50.tar.gz
; * lisp/progmodes/c-ts-mode.el: Change rx to regexp-opt.
-rw-r--r--lisp/progmodes/c-ts-mode.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index f802a6ddb2d..ad64df6143c 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -525,11 +525,11 @@ the subtrees."
;; Navigation.
(setq-local treesit-defun-type-regexp
- (rx (or "function_definition"
- "type_definition"
- "struct_specifier"
- "enum_specifier"
- "union_specifier")))
+ (regexp-opt '("function_definition"
+ "type_definition"
+ "struct_specifier"
+ "enum_specifier"
+ "union_specifier")))
;; Nodes like struct/enum/union_specifier can appear in
;; function_definitions, so we need to find the top-level node.