GNU bug report logs - #59662
29.0.50; [PATCH] Add treesit--indent-defun

Previous Next

Package: emacs;

Reported by: Theodor Thornhill <theo <at> thornhill.no>

Date: Mon, 28 Nov 2022 19:33:01 UTC

Severity: wishlist

Tags: patch

Found in version 29.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #187 received at 59662 <at> debbugs.gnu.org (full text, mbox):

From: Theodor Thornhill <theo <at> thornhill.no>
To: Dmitry Gutov <dgutov <at> yandex.ru>, Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 59662 <at> debbugs.gnu.org, casouri <at> gmail.com,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
Date: Thu, 08 Dec 2022 15:58:52 +0100
Dmitry Gutov <dgutov <at> 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.




This bug report was last modified 2 years and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.