Subject: bug#72704: 29.4; repunctuate-sentences ignores NO-QUERY

From: Joseph Turner <[email-masked]>
Date: Sat, 24 Aug 2024 10:09:10 -0700

Eli Zaretskii <[email-masked]> writes:

>> From: Brian Green <[email-masked]>
>> Date: Sat, 24 Aug 2024 01:29:11 -0700
>> Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked], [email-masked]
>> 
>> I submitted this "bug" report because I mis-interpreted the docstring,
>> and because I was approaching this command with a preconceived idea
>> about how it should work.  I think Eli is right.  I can't think of a
>> good reason why I would need to stipulate a certain behavior before
>> calling the command which I can already get at any point while the
>> command is running.
>
> The doc string indeed could use some improvements, at least in stating
> explicitly what happens in interactive usage and what only when called
> from Lisp.

See patch.  Is the text wrapping acceptable?  It looks too long in
paragraphs.el but good in the *Help* buffer.

>From ada9498e0f92faefa32c44af8726e86cd3096fed Mon Sep 17 00:00:00 2001
From: Joseph Turner <[email-masked]>
Date: Sat, 24 Aug 2024 10:05:17 -0700
Subject: [PATCH] Clarify skipping prompts in repunctuate-sentences docstring

* lisp/textmodes/paragraphs.el (repunctuate-sentences): Update docstring.

bug#72704
---
 lisp/textmodes/paragraphs.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index be741e6517b..0fd30bdd792 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -545,9 +545,11 @@ repunctuate-sentences
 It works using `query-replace-regexp'.  In Transient Mark mode,
 if the mark is active, operate on the contents of the region.
 Second and third arg START and END specify the region to operate on.
-If optional argument NO-QUERY is non-nil, make changes without asking
-for confirmation.  You can use `repunctuate-sentences-filter' to add
-filters to skip occurrences of spaces that don't need to be replaced."
+Noninteractively, if optional argument NO-QUERY is non-nil, make changes
+without asking for confirmation.  Interactively, press \\<query-replace-map>\\[automatic] at the first
+prompt to skip remaining prompts.  You can use
+`repunctuate-sentences-filter' to add filters to skip occurrences of
+spaces that don't need to be replaced."
   (declare (interactive-args (start (use-region-beginning))
                              (end (use-region-end))))
   (interactive (list nil (use-region-beginning) (use-region-end)))
-- 
2.41.0