[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
From: |
Theodor Thornhill |
Subject: |
bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun |
Date: |
Fri, 09 Dec 2022 16:50:25 +0100 |
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 09/12/2022 17:13, Theodor Thornhill via Bug reports for GNU Emacs,
> the Swiss army knife of text editors wrote:
>>>> Something like this?
>>>
>>> Yes. But... :-)
>>>
>>> I guess you can replace (regexp-opt '("comment")) with just "comment"?
>>> Both regexps are equivalent, and neither uses anchoring (like \` and
>>> \'). Should they have anchoring?
>>>
>>
>> Hehe, I did that first, but I trusted you knew some secret about that
>> expression. No, we get the names, so I think it's good.
>
> Shouldn't trust me that much ;-)
>
:-)
> It could be a problem if some grammar somewhere will have a node type
> called "not_comment", and the regexp will still match it. Or
> "pseudo_string", etc.
>
> Not sure how realistic that scenario is, up to you. The authors of such
> major modes could opt for a stricted regexp individually, too.
>
Right. Yeah, I don't think it'll be a problem, but better to be on the
safe side. Tweaked the regexp a little
>>> The programs.texi addition should probably mention refilling too.
>>>
>>
>> Good point. Will fix that.
>
> Still not ideal: it says "refill all the lines within a defun", but the
> refilling step only touches the paragraph around point.
>
> Also about NEWS: "textual element" is a little value; it really refills
> a single paragraph. That distinction is meaningful when a string or a
> comment are long, containing several paragraphs inside.
Something like this?
Theo
0001-Add-prog-fill-reindent-defun-bug-59664.patch
Description: Text Data
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, (continued)
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/08
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/08
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun,
Theodor Thornhill <=
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/10
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/10
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/09
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/10