[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
From: |
Eli Zaretskii |
Subject: |
bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun |
Date: |
Sat, 03 Dec 2022 19:54:55 +0200 |
> Date: Sat, 3 Dec 2022 17:59:04 +0200
> Cc: theo@thornhill.no, casouri@gmail.com, 59662@debbugs.gnu.org,
> casouri@gmail.org
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> > As for M-q, it should be bound to a fill-SOMETHING command, not to a
> > indent-SOMETHING command. So from my POV paredit-mode should be fixed to
> > use some other sequence for paredit-reindent-defun, perhaps even "C-c C-q",
> > but that is IMO an unrelated issue.
> >
> > And if you wanted to suggest that an indent-defun command in c-ts-mode be
> > bound to M-q, then I'm very much against that: M-q already has a useful
> > command bound to it in CC Mode, and should do something similar in
> > c-ts-mode; I believe we are discussing that in bug#59763.
>
> Both c-fill-paragraph and the proposed ts-c-fill-paragraph perform
> fill-region when inside a string or comment. Otherwise, do nothing.
Yes.
> paredit-reindent-defun, like I described, does all that too. But when
> outside strings and comments, it reindents the current defun.
So maybe paredit-reindent-defun doesn't need any fixes, but using it as a
role model for the C-like languages is not TRT, since in C these are two
separate commands with two different key bindings.
> AFAICT, these behaviors are quite compatible. But paredit's binding
> seems to be useful in more contexts.
I'm fine with trying something like that on master, to see whether users
like this conflation, but not on the release branch.
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, (continued)
bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/02
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/02
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/02
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/02
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/03
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/03
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun,
Eli Zaretskii <=
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/07
- 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, 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