bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60360: 30.0.50; prog-fill-reindent-defun doesn't use region


From: Juri Linkov
Subject: bug#60360: 30.0.50; prog-fill-reindent-defun doesn't use region
Date: Wed, 28 Dec 2022 19:22:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]