From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#63790: 30.0.50; prog-fill-reindent-defun regression Date: Thu, 08 Jun 2023 19:59:53 +0300 Organization: LINKOV.NET Message-ID: <86o7lpsxdi.fsf@mail.linkov.net> References: <864jnv6pf8.fsf@mail.linkov.net> <382ab3bd-b9ed-ea18-1ae5-9458ffb1b85c@gutov.dev> <86r0qrtaig.fsf@mail.linkov.net> <86sfb513m2.fsf@mail.linkov.net> <476b767a-2126-50c3-6aa9-6877982ed509@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3140"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 63790@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 08 19:08:34 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7J7i-0000hk-58 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Jun 2023 19:08:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7J7I-0008RW-1H; Thu, 08 Jun 2023 13:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7J7G-0008RF-Ou for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 13:08:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7J7C-0004rx-4g for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 13:08:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7J7B-0008BO-IJ for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 13:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Jun 2023 17:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63790 X-GNU-PR-Package: emacs Original-Received: via spool by 63790-submit@debbugs.gnu.org id=B63790.168624406931427 (code B ref 63790); Thu, 08 Jun 2023 17:08:01 +0000 Original-Received: (at 63790) by debbugs.gnu.org; 8 Jun 2023 17:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:57419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7J6y-0008Ap-No for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:07:48 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:38515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7J6w-0008AZ-5z for 63790@debbugs.gnu.org; Thu, 08 Jun 2023 13:07:47 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 61620FF80A; Thu, 8 Jun 2023 17:07:37 +0000 (UTC) In-Reply-To: <476b767a-2126-50c3-6aa9-6877982ed509@gutov.dev> (Dmitry Gutov's message of "Thu, 8 Jun 2023 03:35:41 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263134 Archived-At: >> (re-search-forward "\\s-*\\s<" (line-end-position) t) > > It's looking for a comment that begins after point (possibly preceded by > whitespace). There is no comment after point in the presented scenario. > >> It's nil in the reported case, so 'fill-paragraph' is not called. > > I guess when there is an active region, we would force the behavior to > "refill" the region, no matter whether it is inside a comment, or contains > a comment, or outside of any comments and simply contains code? While 'prog-fill-reindent-defun' doesn't support indentation of an arbitrary region of code and indents only the top-level list (defun), it looks like the right thing is to fill the region. I still don't understand why 'M-q' now does the same what 'C-M-q' was doing all the time with code indentation? Also why 'prog-fill-reindent-defun' can't indent the region of code, but only the region of comments? Shouldn't 'M-q' only refill comments, and 'C-M-q' only indent code, as before?