GNU bug report logs - #60360
30.0.50; prog-fill-reindent-defun doesn't use region

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 27 Dec 2022 18:15:01 UTC

Severity: normal

Tags: patch

Merged with 60322

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60360 in the body.
You can then email your comments to 60360 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to theo <at> thornhill.no, bug-gnu-emacs <at> gnu.org:
bug#60360; Package emacs. (Tue, 27 Dec 2022 18:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to theo <at> thornhill.no, bug-gnu-emacs <at> gnu.org. (Tue, 27 Dec 2022 18:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; prog-fill-reindent-defun doesn't use region
Date: Tue, 27 Dec 2022 20:13:02 +0200
X-Debbugs-CC: Theodor Thornhill <theo <at> thornhill.no>

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:

  The REGION argument is non-nil if called interactively; in that
  case, if Transient Mark mode is enabled and the mark is active,
  call ‘fill-region’ to fill each of the paragraphs in the active
  region, instead of just filling the current paragraph.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60360; Package emacs. (Tue, 27 Dec 2022 21:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 60360 <at> debbugs.gnu.org (full text, mbox):

From: Theodor Thornhill <theo <at> thornhill.no>
To: Juri Linkov <juri <at> linkov.net>, 60360 <at> debbugs.gnu.org
Subject: Re: bug#60360: 30.0.50; prog-fill-reindent-defun doesn't use region
Date: Tue, 27 Dec 2022 22:01:28 +0100
[Message part 1 (text/plain, inline)]
Hi, Juri!

> X-Debbugs-CC: Theodor Thornhill <theo <at> thornhill.no>
>
> 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:
>
>   The REGION argument is non-nil if called interactively; in that
>   case, if Transient Mark mode is enabled and the mark is active,
>   call ‘fill-region’ to fill each of the paragraphs in the active
>   region, instead of just filling the current paragraph.

Thanks, does the below patch solve your problem?  If so, feel free to
install it, as I can't :-)

Theo

[0001-Fixes-in-prog-fill-reindent-defun.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60360; Package emacs. (Wed, 28 Dec 2022 17:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 60360 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 60360 <at> debbugs.gnu.org
Subject: Re: bug#60360: 30.0.50; prog-fill-reindent-defun doesn't use region
Date: Wed, 28 Dec 2022 19:22:26 +0200
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.




bug marked as fixed in version 30.0.50, send any further explanations to 60360 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 28 Dec 2022 17:24:02 GMT) Full text and rfc822 format available.

Forcibly Merged 60322 60360. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 28 Dec 2022 17:26:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 30.0.50, send any further explanations to 60360 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 28 Dec 2022 17:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 Jan 2023 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 147 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.