texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Wed, 17 Jan 2024 14:23:41 -0500 (EST)

branch: master
commit 6b70f14d1adb8c3173aac83471e13b5e5a348568
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Jan 16 09:28:24 2024 +0100

    * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory):
    make $output_format non-optional.  Update callers.
---
 ChangeLog                           |  5 +++++
 tp/Texinfo/Convert/Converter.pm     | 12 ++++--------
 tp/Texinfo/Convert/DocBook.pm       |  2 +-
 tp/Texinfo/Convert/HTML.pm          |  4 ++--
 tp/Texinfo/Convert/IXIN.pm          |  3 ++-
 tp/Texinfo/Convert/Info.pm          |  3 ++-
 tp/Texinfo/Convert/LaTeX.pm         |  2 +-
 tp/Texinfo/Convert/TexinfoMarkup.pm |  2 +-
 tp/Texinfo/DebugTree.pm             |  2 +-
 9 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f958f69c75..2a439877ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-16  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory):
+       make $output_format non-optional.  Update callers.
+
 2024-01-16  Gavin Smith <gavinsmith0123@gmail.com>
 
        Prevent M-x visit-menu segfault
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index ba9b0eb825..e056a9dab7 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -380,7 +380,8 @@ sub output($$)
   }
 
   my ($output_file, $destination_directory, $output_filename,
-                  $document_name) = $self->determine_files_and_directory();
+       $document_name)
+      = $self->determine_files_and_directory($self->{'output_format'});
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);
   my $succeeded
@@ -695,15 +696,11 @@ sub write_or_return($$$)
 
 my $STDIN_DOCU_NAME = 'stdin';
 
-sub determine_files_and_directory($;$)
+sub determine_files_and_directory($$)
 {
   my $self = shift;
   my $output_format = shift;
 
-  if (not defined($output_format)) {
-    $output_format = $self->{'output_format'};
-  }
-
   # determine input file base name
   my $input_basefile;
   if (defined($self->{'document_info'}->{'input_file_name'})) {
@@ -2284,8 +2281,7 @@ X<C<determine_files_and_directory>>
 Determine output file and directory, as well as names related to files.  The
 result depends on the presence of C<@setfilename>, on the Texinfo input file
 name, and on customization options such as C<OUTPUT>, C<SUBDIR> or C<SPLIT>,
-as described in the Texinfo manual.  I<$output_format> is optional.  If it is
-not set the current output format, if defined, is used instead.  If not an
+as described in the Texinfo manual.  If I<$output_format> is defined and not an
 empty string, C<_$output_format> is prepended to the default directory name.
 
 I<$output_file> is mainly relevant when not split and should be used as the
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 3920fe7ded..1e0de3d849 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -335,7 +335,7 @@ sub output($$)
   my $root = $document->tree();
 
   my ($output_file, $destination_directory, $output_filename)
-    = $self->determine_files_and_directory();
+    = $self->determine_files_and_directory($self->{'output_format'});
 
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index c514fefa76..b522ef24fb 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -12429,8 +12429,8 @@ sub output($$)
   # this sets OUTFILE, to be used if not split, but also 'output_filename'
   # that is useful when split, 'destination_directory' that is mainly useful
   # when split and 'document_name' that is generally useful.
-  my ($output_file, $destination_directory, $output_filename,
-              $document_name) = $self->determine_files_and_directory();
+  my ($output_file, $destination_directory, $output_filename, $document_name)
+        = $self->determine_files_and_directory($self->{'output_format'});
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);
   my $succeeded
diff --git a/tp/Texinfo/Convert/IXIN.pm b/tp/Texinfo/Convert/IXIN.pm
index 47ddf6e76b..7817a03aab 100644
--- a/tp/Texinfo/Convert/IXIN.pm
+++ b/tp/Texinfo/Convert/IXIN.pm
@@ -323,7 +323,8 @@ sub output_ixin($$)
   my $self = shift;
   my $root = shift;
 
-  my ($output_file, $destination_directory) = 
$self->determine_files_and_directory();
+  my ($output_file, $destination_directory, $output_filename)
+    = $self->determine_files_and_directory($self->{'output_format'});
 
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index 16ae0d832e..6de6f7988b 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -72,7 +72,8 @@ sub output($$)
   my $result;
 
   my ($output_file, $destination_directory, $output_filename,
-     $document_name, $input_basefile) = $self->determine_files_and_directory();
+      $document_name, $input_basefile)
+        = $self->determine_files_and_directory($self->{'output_format'});
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);
   my ($succeeded, $created_directory)
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index d40a5f3ac5..7b033f0159 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -1053,7 +1053,7 @@ sub output($$)
   my $root = $document->tree();
 
   my ($output_file, $destination_directory, $output_filename)
-    = $self->determine_files_and_directory();
+    = $self->determine_files_and_directory($self->{'output_format'});
 
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);
diff --git a/tp/Texinfo/Convert/TexinfoMarkup.pm 
b/tp/Texinfo/Convert/TexinfoMarkup.pm
index 826881a1d2..135d225551 100644
--- a/tp/Texinfo/Convert/TexinfoMarkup.pm
+++ b/tp/Texinfo/Convert/TexinfoMarkup.pm
@@ -289,7 +289,7 @@ sub output($$)
   my $root = $document->tree();
 
   my ($output_file, $destination_directory, $output_filename)
-       = $self->determine_files_and_directory();
+       = $self->determine_files_and_directory($self->{'output_format'});
 
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);
diff --git a/tp/Texinfo/DebugTree.pm b/tp/Texinfo/DebugTree.pm
index 34db3c0c82..97059f1f09 100644
--- a/tp/Texinfo/DebugTree.pm
+++ b/tp/Texinfo/DebugTree.pm
@@ -54,7 +54,7 @@ sub output($$)
   my $root = $document->tree();
 
   my ($output_file, $destination_directory)
-    = $self->determine_files_and_directory();
+    = $self->determine_files_and_directory($self->{'output_format'});
 
   my ($encoded_destination_directory, $dir_encoding)
     = $self->encoded_output_file_name($destination_directory);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]