all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-29 fb5d9ff559 1/2: Fix c-ts-mode defun movement (bug#59628)
Date: Thu, 1 Dec 2022 18:53:37 -0800	[thread overview]
Message-ID: <A10BE416-4392-4DC4-97BB-A564E8B737B1@gmail.com> (raw)
In-Reply-To: <83zgc7gmz1.fsf@gnu.org>



> 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


  reply	other threads:[~2022-12-02  2:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 15:30 emacs-29 fb5d9ff559 1/2: Fix c-ts-mode defun movement (bug#59628) Eli Zaretskii
2022-12-02  2:53 ` Yuan Fu [this message]
2022-12-02  6:30 ` Gerd Möllmann
2022-12-02  8:39   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A10BE416-4392-4DC4-97BB-A564E8B737B1@gmail.com \
    --to=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.