From: Eason Huang <aqua0210@foxmail.com>
To: Yuan Fu <casouri@gmail.com>
Cc: dev@rjt.dev, Eli Zaretskii <eliz@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
59498@debbugs.gnu.org, mardani29@yahoo.es
Subject: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled
Date: Mon, 28 Nov 2022 21:59:39 +0800 [thread overview]
Message-ID: <tencent_B7DDD790378DE4D65F1C4B3C913A368EC109@qq.com> (raw)
In-Reply-To: <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@gmail.com> (Yuan Fu's message of "Sun, 27 Nov 2022 14:21:46 -0800")
Yuan Fu <casouri@gmail.com> writes:
>> On Nov 26, 2022, at 11:24 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>>
>>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>>> Cc: Yuan Fu <casouri@gmail.com>, dev@rjt.dev, aqua0210@foxmail.com,
>>> 59498@debbugs.gnu.org, mardani29@yahoo.es
>>> Date: Sun, 27 Nov 2022 02:18:06 -0500
>>>
>>>>> I added treesit-comment-start/end to help indenting comments. So this is
>>>>> the correct way to use them. The following comment explains why I created
>>>>> new variables:
>>>>>
>>>>> ;; `comment-start' and `comment-end' assume there is only one type of
>>>>> ;; comment, and that the comment spans only one line. So they are not
>>>>> ;; sufficient for our purpose.
>>>>
>>>> ??? This is surprisingly unclean, IMO. For starters, the names of the
>>>> variables are confusing. The need to define two sets of comment-start and
>>>> comment-end regexps is also a nuisance and a source of errors.
>>>>
>>>> How do non-treesit modes handle this issue? Why do the treesit-based modes
>>>> need something special here?
>>>>
>>>> Stefan, any ideas?
>>>
>>> `comment-start` and `comment-end` do not describe the set of possible
>>> comment delimiters. They describe the comment delimiters that should be
>>> *inserted* when we do things like `comment-dwim`.
>>>
>>> To find/match comment delimiters we have `comment-start-skip` and
>>> `comment-end-skip`. They're not ideal, but they've been good enough so far.
>>> They don't say which comment starter matches which comment-ender (that
>>> was done by the syntax-tables), but tree-sitter should be able to tell
>>> us that when we need it.
>>>
>>> It would be nice if we could avoid the need to set/use
>>> `comment-start-skip` and `comment-end-skip` when using tree-sitter.
>>> Maybe we can compute their values from the tree-sitter grammar.
>>> But getting rid of uses of those vars will take a fair bit more work,
>>> I think.
>>
>> OK, but do you agree that adding yet another pair of variables,
>> treesit-comment-start/end, is the opposite of what we want?
>
> Yes. I removed them in d5dc1dbf7cb.
>
Hi Yuan,
I build Emacs with the commit a85ff22300, which contain d5dc1dbf7cb,
I can confirm that the indent issue has been fixed.
Thanks you very much.
--
Eason Huang
next prev parent reply other threads:[~2022-11-28 13:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 2:24 bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled Eason Huang
2022-11-23 8:44 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23 10:53 ` Eason Huang
2022-11-24 14:39 ` Randy Taylor
2022-11-25 12:56 ` Eason Huang
2022-11-26 11:18 ` Eli Zaretskii
2022-11-26 22:11 ` Yuan Fu
2022-11-27 6:24 ` Eli Zaretskii
2022-11-27 7:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-27 7:24 ` Eli Zaretskii
2022-11-27 22:21 ` Yuan Fu
2022-11-28 0:24 ` Stefan Kangas
2022-12-18 9:57 ` Eli Zaretskii
2022-12-18 22:49 ` Yuan Fu
2022-12-19 13:51 ` Eli Zaretskii
2022-12-20 1:56 ` Yuan Fu
2022-12-20 15:18 ` Eli Zaretskii
2022-12-21 0:37 ` Yuan Fu
2022-11-28 13:59 ` Eason Huang [this message]
2022-11-27 22:00 ` Yuan Fu
[not found] <m24juq9zn6.fsf@foxmail.com>
2022-11-30 21:33 ` Yuan Fu
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=tencent_B7DDD790378DE4D65F1C4B3C913A368EC109@qq.com \
--to=aqua0210@foxmail.com \
--cc=59498@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=dev@rjt.dev \
--cc=eliz@gnu.org \
--cc=mardani29@yahoo.es \
--cc=monnier@iro.umontreal.ca \
/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.