[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-do
From: |
Juri Linkov |
Subject: |
bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space |
Date: |
Mon, 13 May 2024 09:50:32 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> So you are saying that query-replace already does the job? Fine by
> me; if no one else supports this bug report in a week or two, I will
> close.
Actually there is another problem: whereas it's easy to rely on the
variable sentence-end-double-space as was asked by this request:
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index af99a96e045..974a83efdea 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -532,7 +532,10 @@ repunctuate-sentences
(end (use-region-end))))
(interactive (list nil (use-region-beginning) (use-region-end)))
(let ((regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +")
- (to-string "\\1\\2\\3 "))
+ (to-string (concat "\\1\\2\\3 "
+ (if sentence-end-double-space
+ " "
+ ""))))
(if no-query
(progn
(when start (goto-char start))
But the problem is that when a user customized
sentence-end-double-space to nil, the user still
might want to put two spaces since the docstring says:
"Put two spaces at the end of sentences"
So using one space will contradict the docstring.
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Geoffrey Teale, 2024/05/08
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Eli Zaretskii, 2024/05/11
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Juri Linkov, 2024/05/12
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Eli Zaretskii, 2024/05/12
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Juri Linkov, 2024/05/12
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Eli Zaretskii, 2024/05/12
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space,
Juri Linkov <=
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Geoffrey Teale, 2024/05/13
- bug#70832: 30.0.50; repunctuate-sentences should respect sentence-end-double-space, Eli Zaretskii, 2024/05/25