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 #35 received at 59662 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 59662 <at> debbugs.gnu.org, theo <at> thornhill.no, casouri <at> gmail.org
Subject: Re: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
Date: Thu, 01 Dec 2022 09:19:28 +0200
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Wed, 30 Nov 2022 17:07:48 -0800
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>  59662 <at> debbugs.gnu.org,
>  casouri <at> gmail.org
> 
> > 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.




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.