GNU bug report logs -
#59662
29.0.50; [PATCH] Add treesit--indent-defun
Previous Next
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Theodor Thornhill <theo <at> thornhill.no>
>> Cc: casouri <at> gmail.com, 59662 <at> 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 (text/x-diff, attachment)]
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.