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#60360: 30.0.50; prog-fill-reindent-defun doesn't use region Date: Wed, 28 Dec 2022 19:22:26 +0200 Organization: LINKOV.NET Message-ID: <86r0wjphnx.fsf@mail.linkov.net> References: <865ydwc3p1.fsf@mail.linkov.net> <871qoky313.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34486"; 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: 60360@debbugs.gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 28 18:24:13 2022 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 1pAa9z-0008ll-L5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Dec 2022 18:24:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAa9s-0003a1-Li; Wed, 28 Dec 2022 12:24:04 -0500 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 1pAa9q-0003X5-NQ for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 12:24:02 -0500 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 1pAa9q-0000s2-FX for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 12:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAa9q-0000s3-Ay for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 12:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Dec 2022 17:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60360 X-GNU-PR-Package: emacs Original-Received: via spool by 60360-submit@debbugs.gnu.org id=B60360.16722481893255 (code B ref 60360); Wed, 28 Dec 2022 17:24:02 +0000 Original-Received: (at 60360) by debbugs.gnu.org; 28 Dec 2022 17:23:09 +0000 Original-Received: from localhost ([127.0.0.1]:58532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAa8z-0000qR-19 for submit@debbugs.gnu.org; Wed, 28 Dec 2022 12:23:09 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:33831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAa8x-0000pX-Jk; Wed, 28 Dec 2022 12:23:08 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 7F95D1BF203; Wed, 28 Dec 2022 17:22:57 +0000 (UTC) In-Reply-To: <871qoky313.fsf@thornhill.no> (Theodor Thornhill's message of "Tue, 27 Dec 2022 22:01:28 +0100") 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:251993 Archived-At: close 60360 30.0.50 thanks >> After selecting the region in a docstring, M-q used to fill the region, >> but new prog-fill-reindent-defun doesn't do this. The original >> function had the argument REGION for that, described thusly: > > Thanks, does the below patch solve your problem? If so, feel free to > install it, as I can't :-) Thanks for the patch. I confirmed that it works, and then pushed to master. > @@ -164,10 +164,8 @@ prog-fill-reindent-defun > ... > + (re-search-forward "^\\s<" (line-end-position) t)) > + (fill-paragraph argument (region-active-p)) Usually use-region-p would be a better choice, but in this case region-active-p is fine since it follows the logic used by the REGION arg of fill-paragraph.