all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Theodor Thornhill <theo@thornhill.no>
Cc: 60360@debbugs.gnu.org
Subject: bug#60360: 30.0.50; prog-fill-reindent-defun doesn't use region
Date: Wed, 28 Dec 2022 19:22:26 +0200	[thread overview]
Message-ID: <86r0wjphnx.fsf@mail.linkov.net> (raw)
In-Reply-To: <871qoky313.fsf@thornhill.no> (Theodor Thornhill's message of "Tue, 27 Dec 2022 22:01:28 +0100")

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	other threads:[~2022-12-28 17:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 18:13 bug#60360: 30.0.50; prog-fill-reindent-defun doesn't use region Juri Linkov
2022-12-27 21:01 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-28 17:22   ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r0wjphnx.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=60360@debbugs.gnu.org \
    --cc=theo@thornhill.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.