[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, 02 Dec 2022 19:32:33 +0100 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Theodor Thornhill <theo@thornhill.no>
>> Cc: casouri@gmail.com, 59662@debbugs.gnu.org
>> Date: Fri, 02 Dec 2022 16:06:46 +0100
>>
>> > Why in lisp.el? we are talking about a feature of C-like languages. The
>> > current binding of "C-c C-q" is in cc-cmds.el, so what I had in mind is to
>> > have its counterpart in c-ts-mode.el.
>>
>> Something like this?
>
> Yes, thanks.
>
> But a command should not have "--" in its name, since every command is by
> definition a public function, not an internal one.
That makes sense. I was in doubt about that, but decided to go the
(wrong) direction. Updated in latest patch.
However - mark-defun signals an error on some constructs because of
number-or-marker error:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
treesit-end-of-defun()
c-ts-mode--end-of-defun()
end-of-defun()
mark-defun(1 nil)
mark-defun(1 23209)
funcall-interactively(mark-defun 1 23209)
call-interactively(mark-defun record nil)
command-execute(mark-defun record)
execute-extended-command(nil "mark-defun" nil)
funcall-interactively(execute-extended-command nil "mark-defun" nil)
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
I'll file a separate bug report for this one, if that's ok? Yuan, are
you ok with this patch?
Theo
0001-Add-c-ts-mode-indent-defun.patch
Description: Text Data
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/01
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/01
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/01
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/01
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/01
- 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, Eli Zaretskii, 2022/12/02
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun,
Theodor Thornhill <=
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/02
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Daniel Martín, 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, Daniel Martín, 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, Theodor Thornhill, 2022/12/04
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/04
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Theodor Thornhill, 2022/12/07
- bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Eli Zaretskii, 2022/12/07
bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun, Dmitry Gutov, 2022/12/02