[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: |
Thu, 08 Dec 2022 17:33:04 +0100 |
On 8 December 2022 17:06:26 CET, Dmitry Gutov <dgutov@yandex.ru> wrote:
>On 08/12/2022 16:58, Theodor Thornhill via Bug reports for GNU Emacs, the
>Swiss army knife of text editors wrote:
>> Dmitry Gutov<dgutov@yandex.ru> writes:
>>
>>> On 08/12/2022 13:09, Theodor Thornhill wrote:
>>>> What about this? I changed it to make a point that we should fill if
>>>> inside of a string or comment, and indent if inside a code block. We
>>>> one such variable for each type, or in both as suggested below.
>>> Could you rephrase maybe? I'm not seeing the difference.
>> In the first example I made the variable specific to comments. But
>> filling should work on everything that's considered text, IIUC. So if
>> the variable refers to both the regex needs to accommodate strings and
>> comments. That will in turn make it less useful if we want to find
>> comments specifically, or strings specifically. so we could have both
>> 'treesit-comment-regexp' and 'treesit-string-regexp' and match on '(or
>> treesit-comment-regexp treesit-string-regexp)' in this particular case.
>>
>> Not really sure if that made more sense.
>
>Ah. So that was about the name of the variable. Looks good.
>
Yeah, and thus what nodes it should capture
>Note that if the improvement which I described ever comes to life (hopefully),
>then the variable will probably need to be renamed/moved/multiplied again.
Why is that?
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, (continued)
- 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/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, Theodor Thornhill, 2022/12/08
- 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/08
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 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, Dmitry Gutov, 2022/12/08
- 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/08
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/08
- 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, Dmitry Gutov, 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, Dmitry Gutov, 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, Stefan Monnier, 2022/12/08
- 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