[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/LaTeX.pm (_convert) <@def*>:
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/Convert/LaTeX.pm (_convert) <@def*>: Combine code setting strings argument to gdt, for concision. |
Date: |
Wed, 27 Jul 2022 10:08:01 -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 a5a735fa3e * tp/Texinfo/Convert/LaTeX.pm (_convert) <@def*>: Combine
code setting strings argument to gdt, for concision.
a5a735fa3e is described below
commit a5a735fa3e2ff2d090b4d117b0e875037bfb216e
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Jul 27 15:07:53 2022 +0100
* tp/Texinfo/Convert/LaTeX.pm (_convert) <@def*>:
Combine code setting strings argument to gdt, for concision.
---
ChangeLog | 5 +++++
tp/Texinfo/Convert/LaTeX.pm | 47 +++++++++++++--------------------------------
2 files changed, 18 insertions(+), 34 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6db9e060ce..1daa6cf383 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-07-27 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/Convert/LaTeX.pm (_convert) <@def*>:
+ Combine code setting strings argument to gdt, for concision.
+
2022-07-27 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/Convert/LaTeX.pm (_convert) <deftypefnnewline>:
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 76b20ff5b4..12ca33393c 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -3428,6 +3428,13 @@ sub _convert($$)
}
$result .= '\noindent\texttt{';
+ my $strings = {
+ 'name' => $name,
+ 'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
+ };
+ $strings->{'arguments'} = _only_slanted_no_code_contents($arguments)
+ if ($arguments);
+
my $category = $element->{'extra'}->{'def_parsed_hash'}->{'category'};
if ($command eq 'deffn'
@@ -3437,28 +3444,19 @@ sub _convert($$)
or $command eq 'deftypevr')
and !$element->{'extra'}->{'def_parsed_hash'}->{'type'})) {
if ($arguments) {
- $tree = $self->gdt('{name} {arguments}', {
- 'name' => $name,
- 'arguments' => _only_slanted_no_code_contents($arguments)});
+ $tree = $self->gdt('{name} {arguments}', $strings);
} else {
- $tree = $self->gdt("{name}", { 'name' => $name});
+ $tree = $self->gdt("{name}", $strings);
}
} elsif ($command eq 'deftypefn'
or $command eq 'deftypevr') {
if ($arguments) {
- my $strings = {
- 'name' => $name,
- 'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
- 'arguments' => _only_slanted_no_code_contents($arguments)};
if ($self->get_conf('deftypefnnewline') eq 'on') {
$tree = $self->gdt("{type}\@*{name} {arguments}", $strings);
} else {
$tree = $self->gdt('{type} {name} {arguments}', $strings);
}
} else {
- my $strings = {
- 'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
- 'name' => $name};
if ($self->get_conf('deftypefnnewline') eq 'on') {
$tree = $self->gdt('{type}@*{name}', $strings);
} else {
@@ -3473,11 +3471,9 @@ sub _convert($$)
{ 'category' =>
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'} }
);
if ($arguments) {
- $tree = $self->gdt('{name} {arguments}', {
- 'name' => $name,
- 'arguments' =>
_only_slanted_no_code_contents($arguments)});
+ $tree = $self->gdt('{name} {arguments}', $strings);
} else {
- $tree = $self->gdt("{name}", { 'name' => $name});
+ $tree = $self->gdt("{name}", $strings);
}
} elsif ($command eq 'defop'
or ($command eq 'deftypeop'
@@ -3486,31 +3482,21 @@ sub _convert($$)
{ 'category' =>
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
'class' =>
$element->{'extra'}->{'def_parsed_hash'}->{'class'} } );
if ($arguments) {
- $tree = $self->gdt('{name} {arguments}', {
- 'name' => $name,
- 'arguments' =>
_only_slanted_no_code_contents($arguments)});
+ $tree = $self->gdt('{name} {arguments}', $strings);
} else {
- $tree = $self->gdt('{name}', { 'name' => $name});
+ $tree = $self->gdt('{name}', $strings);
}
} elsif ($command eq 'deftypeop') {
$category = $self->gdt('{category} on @code{{class}}',
{ 'category' =>
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'}
} );
if ($arguments) {
- my $strings = {
- 'name' => $name,
- 'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
- 'arguments' => _only_slanted_no_code_contents($arguments)};
-
if ($self->get_conf('deftypefnnewline') eq 'on') {
$tree = $self->gdt('{type}@*{name} {arguments}', $strings);
} else {
$tree = $self->gdt('{type} {name} {arguments}', $strings);
}
} else {
- my $strings = {
- 'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
- 'name' => $name};
if ($self->get_conf('deftypefnnewline') eq 'on') {
$tree = $self->gdt('{type}@*{name}', $strings);
} else {
@@ -3522,19 +3508,12 @@ sub _convert($$)
{ 'category' =>
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'} }
);
if ($arguments) {
- my $strings = {
- 'name' => $name,
- 'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
- 'arguments' => _only_slanted_no_code_contents($arguments)};
if ($self->get_conf('deftypefnnewline') eq 'on') {
$tree = $self->gdt('{type}@*{name} {arguments}', $strings);
} else {
$tree = $self->gdt('{type} {name} {arguments}', $strings);
}
} else {
- my $strings = {
- 'type' =>
$element->{'extra'}->{'def_parsed_hash'}->{'type'},
- 'name' => $name};
if ($self->get_conf('deftypefnnewline') eq 'on') {
$tree = $self->gdt('{type}@*{name}', $strings);
} else {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/LaTeX.pm (_convert) <@def*>: Combine code setting strings argument to gdt, for concision.,
Gavin D. Smith <=