[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/ParagraphNonXS.pm (set_space
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/Convert/ParagraphNonXS.pm (set_space_protection), * tp/Texinfo/XS/xspara.c (xs_set_space_protection): Remove code making end of sentence up to two spaces as it is not clear that this is necessary or correct. |
Date: |
Tue, 05 Jul 2022 06:36:17 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 4b0086bf42 * tp/Texinfo/Convert/ParagraphNonXS.pm
(set_space_protection), * tp/Texinfo/XS/xspara.c (xs_set_space_protection):
Remove code making end of sentence up to two spaces as it is not clear that
this is necessary or correct.
4b0086bf42 is described below
commit 4b0086bf42e6c634e5d0a2ed4c8a297abcc665bc
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Jul 5 11:34:46 2022 +0100
* tp/Texinfo/Convert/ParagraphNonXS.pm (set_space_protection),
* tp/Texinfo/XS/xspara.c (xs_set_space_protection):
Remove code making end of sentence up to two spaces as it is not
clear that this is necessary or correct.
---
ChangeLog | 7 +++++++
tp/Texinfo/Convert/ParagraphNonXS.pm | 8 --------
tp/Texinfo/XS/xspara.c | 31 ++-----------------------------
3 files changed, 9 insertions(+), 37 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f8da2248ff..fc461f8e60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-07-05 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/Convert/ParagraphNonXS.pm (set_space_protection),
+ * tp/Texinfo/XS/xspara.c (xs_set_space_protection):
+ Remove code making end of sentence up to two spaces as it is not
+ clear that this is necessary or correct.
+
2022-06-05 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.texi: Change all Wikipedia links to use https.
diff --git a/tp/Texinfo/Convert/ParagraphNonXS.pm
b/tp/Texinfo/Convert/ParagraphNonXS.pm
index 7f82615479..b8497d959c 100644
--- a/tp/Texinfo/Convert/ParagraphNonXS.pm
+++ b/tp/Texinfo/Convert/ParagraphNonXS.pm
@@ -281,14 +281,6 @@ sub set_space_protection($$;$$$$)
if defined($ignore_columns);
$paragraph->{'keep_end_lines'} = $keep_end_lines
if defined($keep_end_lines);
- if (!$paragraph->{'frenchspacing'} and $frenchspacing
- and $paragraph->{'end_sentence'} and $paragraph->{'counter'} != 0
- and $paragraph->{'space'} and !defined($paragraph->{'word'})) {
- $paragraph->{'space'} .= ' ' x (2 - length($paragraph->{'space'}));
- print STDERR "SWITCH frenchspacing end sentence space\n"
- if ($paragraph->{'DEBUG'});
- delete $paragraph->{'end_sentence'};
- }
$paragraph->{'frenchspacing'} = $frenchspacing
if defined($frenchspacing);
$paragraph->{'double_width_no_break'} = $double_width_no_break
diff --git a/tp/Texinfo/XS/xspara.c b/tp/Texinfo/XS/xspara.c
index c04ea77e52..9b0f4bc15c 100644
--- a/tp/Texinfo/XS/xspara.c
+++ b/tp/Texinfo/XS/xspara.c
@@ -785,6 +785,8 @@ xspara_set_space_protection (int protect_spaces,
state.keep_end_lines = keep_end_lines;
if (double_width_no_break != -1)
state.double_width_no_break = double_width_no_break;
+ if (french_spacing != -1)
+ state.french_spacing = french_spacing;
/*fprintf (stderr, "SETTING SPACE (%d, %d, %d, %d)\n",
protect_spaces,
@@ -792,35 +794,6 @@ xspara_set_space_protection (int protect_spaces,
keep_end_lines,
french_spacing);*/
- /* If at the end of a sentence, and due to output the end of sentence
- space, and we switch to French spacing, then make the space up to
- two spaces.
-
- FIXME: This seems back-to-front: We want two spaces if we switch FROM
- French spacing. */
-
- if (state.french_spacing == 0
- && french_spacing != -1 && french_spacing != 0
- && state.end_sentence != -2 && state.end_sentence != 0
- && state.counter != 0
- && state.space.end > 0
- && state.word.end == 0 && !state.invisible_pending_word)
- {
- while (state.space_counter < 2)
- {
- text_append_n (&state.space, " ", 1);
- state.space_counter++;
- }
-
- /* End of sentence done. */
- state.end_sentence = -2;
- }
-
- if (french_spacing != -1)
- {
- state.french_spacing = french_spacing;
- }
-
if (protect_spaces != -1 && state.protect_spaces)
{
if (state.word.end == 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/ParagraphNonXS.pm (set_space_protection), * tp/Texinfo/XS/xspara.c (xs_set_space_protection): Remove code making end of sentence up to two spaces as it is not clear that this is necessary or correct.,
Gavin D. Smith <=