[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 31 Jul 2022 07:09:20 -0400 (EDT) |
branch: master
commit f37678d66cf288a3a6fc831fda7909bc22cfa554
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jul 31 13:09:05 2022 +0200
No @deftypefnnewline effect on typed variable definitions in Info
* tp/Texinfo/Convert/Plaintext.pm (_convert): effect of
@deftypefnnewline on for deftypefn and deftypeop only.
---
ChangeLog | 7 +
tp/Texinfo/Convert/Plaintext.pm | 36 +-
.../converters_tests/test_deftypefnnewline.pl | 8 +-
.../res_parser/formatting_info/formatting.info | 889 ++++++++++-----------
.../res_parser/formatting_plaintext/formatting.txt | 849 ++++++++++----------
5 files changed, 878 insertions(+), 911 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f122c2c70d..8a1b1e20f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-07-31 Patrice Dumas <pertusus@free.fr>
+
+ No @deftypefnnewline effect on typed variable definitions in Info
+
+ * tp/Texinfo/Convert/Plaintext.pm (_convert): effect of
+ @deftypefnnewline on for deftypefn and deftypeop only.
+
2022-07-31 Patrice Dumas <pertusus@free.fr>
No @deftypefnnewline effect on typed variable definitions in LaTeX
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 4e40bd598c..68813ad199 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -2821,7 +2821,8 @@ sub _convert($$)
'name' => $name,
'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
'arguments' => $arguments};
- if ($self->get_conf('deftypefnnewline') eq 'on') {
+ if ($self->get_conf('deftypefnnewline') eq 'on'
+ and $command eq 'deftypefn') {
$tree = $self->gdt("\@tie{}-- {category}:\@*{type}\@*{name}
{arguments}",
$strings);
} else {
@@ -2833,7 +2834,8 @@ sub _convert($$)
'category' =>
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
'name' => $name};
- if ($self->get_conf('deftypefnnewline') eq 'on') {
+ if ($self->get_conf('deftypefnnewline') eq 'on'
+ and $command eq 'deftypefn') {
$tree = $self->gdt("\@tie{}-- {category}:\@*{type}\@*{name}",
$strings);
} else {
@@ -2880,11 +2882,11 @@ sub _convert($$)
'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
'arguments' => $arguments};
if ($self->get_conf('deftypefnnewline') eq 'on') {
- $tree
+ $tree
= $self->gdt("\@tie{}-- {category} on
{class}:\@*{type}\@*{name} {arguments}",
$strings);
} else {
- $tree
+ $tree
= $self->gdt("\@tie{}-- {category} on {class}: {type} {name}
{arguments}",
$strings);
}
@@ -2895,11 +2897,11 @@ sub _convert($$)
'class' =>
$element->{'extra'}->{'def_parsed_hash'}->{'class'},
'name' => $name};
if ($self->get_conf('deftypefnnewline') eq 'on') {
- $tree
+ $tree
= $self->gdt("\@tie{}-- {category} on
{class}:\@*{type}\@*{name}",
$strings);
} else {
- $tree
+ $tree
= $self->gdt("\@tie{}-- {category} on {class}: {type} {name}",
$strings);
}
@@ -2912,30 +2914,18 @@ sub _convert($$)
'class' =>
$element->{'extra'}->{'def_parsed_hash'}->{'class'},
'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
'arguments' => $arguments};
- if ($self->get_conf('deftypefnnewline') eq 'on') {
- $tree
- = $self->gdt("\@tie{}-- {category} of
{class}:\@*{type}\@*{name} {arguments}",
- $strings);
- } else {
- $tree
- = $self->gdt("\@tie{}-- {category} of {class}: {type} {name}
{arguments}",
- $strings);
- }
+ $tree
+ = $self->gdt("\@tie{}-- {category} of {class}: {type} {name}
{arguments}",
+ $strings);
} else {
my $strings = {
'category' =>
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
'class' =>
$element->{'extra'}->{'def_parsed_hash'}->{'class'},
'name' => $name};
- if ($self->get_conf('deftypefnnewline') eq 'on') {
- $tree
- = $self->gdt("\@tie{}-- {category} of
{class}:\@*{type}\@*{name}",
+ $tree
+ = $self->gdt("\@tie{}-- {category} of {class}: {type} {name}",
$strings);
- } else {
- $tree
- = $self->gdt("\@tie{}-- {category} of {class}: {type} {name}",
- $strings);
- }
}
}
diff --git a/tp/t/results/converters_tests/test_deftypefnnewline.pl
b/tp/t/results/converters_tests/test_deftypefnnewline.pl
index 58ef3d6b7e..50a88803d8 100644
--- a/tp/t/results/converters_tests/test_deftypefnnewline.pl
+++ b/tp/t/results/converters_tests/test_deftypefnnewline.pl
@@ -3369,14 +3369,10 @@
$result_converted{'plaintext'}->{'test_deftypefnnewline'} = 'top
d--eftypeop_name
d–eftypeop no arg
- -- c--ategory of c--lass:
- t--ype
- d--eftypecv_name
+ -- c--ategory of c--lass: t--ype d--eftypecv_name
d–eftypecv
- -- c--ategory of c--lass:
- t--ype
- d--eftypecv_name a--rguments...
+ -- c--ategory of c--lass: t--ype d--eftypecv_name a--rguments...
d–eftypecv with arguments
-- fun: arg
diff --git a/tp/tests/layout/res_parser/formatting_info/formatting.info
b/tp/tests/layout/res_parser/formatting_info/formatting.info
index bfda32e76a..06e7a804f5 100644
--- a/tp/tests/layout/res_parser/formatting_info/formatting.info
+++ b/tp/tests/layout/res_parser/formatting_info/formatting.info
@@ -403,14 +403,10 @@ s-mallformat
d--eftypeop_name2
d-eftypeop no arg2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2
d-eftypecv2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2 a--rguments2...
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2 a--rguments2...
d-eftypecv with arguments2
-- fun2: arg2
@@ -1117,14 +1113,10 @@ s-mallformat
d--eftypeop_name2
d-eftypeop no arg2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2
d-eftypecv2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2 a--rguments2...
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2 a--rguments2...
d-eftypecv with arguments2
-- fun2: arg2
@@ -1788,14 +1780,10 @@ s-mallformat
d--eftypeop_name2
d-eftypeop no arg2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2
d-eftypecv2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2 a--rguments2...
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2 a--rguments2...
d-eftypecv with arguments2
-- fun2: arg2
@@ -2598,14 +2586,11 @@ cross ref name: (file name). '@inforef{}' *note ::
d--eftypeop_name2
d--eftypeop no arg2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2
d--eftypecv2
- -- c--ategory2 of c--lass2:
- t--ype2
- d--eftypecv_name2 a--rguments2...
+ -- c--ategory2 of c--lass2: t--ype2 d--eftypecv_name2
+ a--rguments2...
d--eftypecv with arguments2
-- fun2: arg2
@@ -2911,14 +2896,14 @@ aaa"