[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-29 fb5d9ff559 1/2: Fix c-ts-mode defun movement (bug#59628)
From: |
Yuan Fu |
Subject: |
Re: emacs-29 fb5d9ff559 1/2: Fix c-ts-mode defun movement (bug#59628) |
Date: |
Thu, 1 Dec 2022 18:53:37 -0800 |
> On Dec 1, 2022, at 7:30 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> ;; Navigation.
>> (setq-local treesit-defun-type-regexp
>> - (rx (or "specifier"
>> - "definition")))
>> + (rx (or "function_definition"
>> + "type_definition"
>> + "struct_specifier"
>> + "enum_specifier"
>> + "union_specifier")))
>
> Shouldn't we use regex-opt here?
I wasn’t aware of this function. Though it doesn’t seems to make a difference,
I would expect it to transform the regex into something like
(rx (or (seq (or "function" "type") "_definition")
(seq (or "struct" "enum" "union") "_specifier")))
Anyway, I changed it to use regexp-opt.
Yuan