Subject: Re: bug#76641: 30.1; M-q fails in makefile-mode
From: Eli Zaretskii <[email-masked]>
To: Benjamin Riefenstahl <[email-masked]>
Cc: [email-masked]
Date: Sat, 01 Mar 2025 16:07:01 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Benjamin Riefenstahl <[email-masked]>
> Date: Fri, 28 Feb 2025 14:38:55 +0100
> 
> Since Emacs 30, M-q does not work in makefiles for my most common use
> case.
> 
> Reproduction:
> 
> * Create a file "Makefile" with this content (without the indentation)
> 
>     v = 1 2 3 4 5 \
>         6 7 8 9 0
> 
> * Put point inside that expression and press M-q.
> 
> * Expected result:
> 
>     v = 1 2 3 4 5 6 7 8 9 0
> 
> * Actual result: No change.
> 
> Explanation:
> 
> In Emacs 29, M-q was bound to fill-paragraph.  In Emacs 30 it is bound
> to prog-fill-reindent-defun.
> 
> Why that function does not work, I am not sure.  It seems to check
> tree-sitter before falling back to fill-paragraph, but the fallback does
> not happen, at least not in the function prog-fill-reindent-defun
> itself.
> 
> As a workaround I am now binding M-q to fill-paragraph myself in
> makefile-mode. 

Thanks, I've installed a change on the emacs-30 release branch that
binds M-q to fill-paragraph in makefile-mode.

With that, I'm closing this bug.