texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Gavin D. Smith
Date: Thu, 27 Oct 2022 05:12:08 -0400 (EDT)

branch: master
commit 357e9bc576e793bef701921d031b765aee597da8
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu Oct 27 10:11:58 2022 +0100

    * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Access 'conf'
    hash directly for efficiency, rather than calling get_conf.
---
 ChangeLog                       | 5 +++++
 tp/Texinfo/Convert/Plaintext.pm | 9 +++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 132f115ba6..52528af6cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-27  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Access 'conf'
+       hash directly for efficiency, rather than calling get_conf.
+
 2022-10-27  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * README-hacking: more on Devel::NYTProf
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index f0c7e556b2..3f9e4d828e 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -660,7 +660,10 @@ sub new_formatter($$;$)
          'indent_level'      => 
$self->{'format_context'}->[-1]->{'indent_level'}, 
   };
   $container_conf->{'frenchspacing'} = 1 
-    if ($self->get_conf('frenchspacing') eq 'on');
+    if ($self->{'conf'}->{'frenchspacing'} eq 'on');
+    #if ($self->get_conf('frenchspacing') eq 'on');
+    # access 'conf' hash directly for efficiency
+
   $container_conf->{'counter'} 
     = $self->{'text_element_context'}->[-1]->{'counter'}
       if (defined($self->{'text_element_context'}->[-1]->{'counter'}));
@@ -710,7 +713,9 @@ sub new_formatter($$;$)
   my $formatter = {'container' => $container, 'upper_case' => 0,
                    'font_type_stack' => [{}],
                    'w' => 0, 'type' => $type,
-              'frenchspacing_stack' => [$self->get_conf('frenchspacing')],
+              'frenchspacing_stack' => [$self->{'conf'}->{'frenchspacing'}],
+              #'frenchspacing_stack' => [$self->get_conf('frenchspacing')],
+              # access 'conf' hash directly for efficiency
               'suppress_styles' => undef,
               'no_added_eol' => undef};
   if ($conf) {



reply via email to

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