Seems perfect to me.

I'll let Gavin check and apply it.

On Wed, Nov 27, 2024 at 05:31:15AM +0000, Carlos Maniero wrote:
> ---
> V3:
> - Add missing entry on Changelog
> - Update the commit message with the Changelog entry
> 
> Thanks Patrice for the feedback!
> 
>  ChangeLog                    | 7 +++++++
>  tp/ext/highlight_syntax.pm   | 5 +++++
>  tp/tests/other/list-of-tests | 4 ++--
>  3 files changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index c13222653e..41e4ecf5e0 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,10 @@
> +2024-11-27  Carlos Maniero  <car...@maniero.me>
> +
> +     * tp/ext/highlight_syntax.pm: show warning if HIGHLIGHT_SYNTAX is
> +     defaulting to source-highlight since this behaviour will change in the
> +     near future.
> +     * tp/tests/other/list-of-tests: set HIGHLIGHT_SYNTAX=source-highlight
> +
>  2024-11-26  Patrice Dumas  <pertu...@free.fr>
>  
>       * configure.ac (--enable-xs-perl-libintl), tp/Texinfo/XS/configure.ac
> diff --git a/tp/ext/highlight_syntax.pm b/tp/ext/highlight_syntax.pm
> index 953f5c10eb..e03a4feb1c 100644
> --- a/tp/ext/highlight_syntax.pm
> +++ b/tp/ext/highlight_syntax.pm
> @@ -80,6 +80,11 @@ sub highlight_setup($$)
>    } elsif (defined($highlight_type) and $highlight_type eq 'pygments') {
>      $cmd = 'pygmentize -L lexers';
>    } else {
> +    if (defined($highlight_type) and $highlight_type ne 'source-highlight') {
> +      $self->converter_document_warn(sprintf(__(
> +        "`%s' is not valid for HIGHLIGHT_SYNTAX. Set to 
> `source-highlight'?"),
> +        $highlight_type));
> +    }
>      $highlight_type = 'source-highlight';
>      $cmd = 'source-highlight --lang-list';
>    }
> diff --git a/tp/tests/other/list-of-tests b/tp/tests/other/list-of-tests
> index 963befe46b..1a79af0e05 100644
> --- a/tp/tests/other/list-of-tests
> +++ b/tp/tests/other/list-of-tests
> @@ -1,10 +1,10 @@
>  
>  # syntax highlighting in examples
> -highlight_syntax_example highlight_example.texi --html -c HIGHLIGHT_SYNTAX=1
> +highlight_syntax_example highlight_example.texi --html -c 
> HIGHLIGHT_SYNTAX=source-highlight
>  highlight_syntax_example_pygments highlight_example.texi --html -c 
> HIGHLIGHT_SYNTAX=pygments
>  highlight_syntax_example_highlight highlight_example.texi --html -c 
> HIGHLIGHT_SYNTAX=highlight
>  
> -highlight_syntax_example_default_language highlight_example.texi --html -c 
> HIGHLIGHT_SYNTAX=1 -c HIGHLIGHT_SYNTAX_DEFAULT_LANGUAGE=Perl
> +highlight_syntax_example_default_language highlight_example.texi --html -c 
> HIGHLIGHT_SYNTAX=source-highlight -c HIGHLIGHT_SYNTAX_DEFAULT_LANGUAGE=Perl
>  
>  highlight_syntax_example_latin9 highlight_example.texi --html 
> --init=highlight_syntax.pm -c 'OUTPUT_ENCODING_NAME=ISO-8859-15'
>  
> 
> base-commit: 545fe7ff7a01aa09554475d94b5db23cfb1bad32
> -- 
> 2.46.1
> 
> 

Reply via email to