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.

Full log


Message #13 received at control <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.




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

Previous Next


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