Subject: Re: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun

From: Eli Zaretskii <[email-masked]>
Date: Thu, 01 Dec 2022 09:19:28 +0200

> From: Yuan Fu <[email-masked]>
> Date: Wed, 30 Nov 2022 17:07:48 -0800
> Cc: Eli Zaretskii <[email-masked]>,
>  [email-masked],
>  [email-masked]
> 
> > I’m thinking something like
> > 
> > (defun prog-mode-indent-defun ()
> >  (interactive)
> >  (mark-defun)
> >  (indent-region (region-beginning) (region-end)))
> > 
> > (defvar prog-mode-map
> >  (...
> >   (define-key map (kbd "C-c C-q") #'prog-mode-indent-defun)))
> 
> Tho I’d prefer we bind it in major mode maps first. Adding anything to prog-mode-map should go through emacs-devel (and I don’t know if we want to add any bindings to prog-mode-map), of course.

I agree and think we should first do this only in C and related modes.