[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * doc/texinfo.texi (Global Customization Variable
From: |
Patrice Dumas |
Subject: |
branch master updated: * doc/texinfo.texi (Global Customization Variables), tp/Texinfo/Common.pm (%parser_options), tp/Texinfo/ParserNonXS.pm (%parser_inner_configuration, _new_macro, _parse_line_command_args), tp/Texinfo/Translations.pm (_replace_convert_substrings), tp/Texinfo/XS/main/translations.c (replace_convert_substrings), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser), tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_NO_INDEX) (conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/api.c, tp/Texinfo/XS/parset [...] |
Date: |
Fri, 17 May 2024 12:35:44 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 77dca8d3f5 * doc/texinfo.texi (Global Customization Variables),
tp/Texinfo/Common.pm (%parser_options), tp/Texinfo/ParserNonXS.pm
(%parser_inner_configuration, _new_macro, _parse_line_command_args),
tp/Texinfo/Translations.pm (_replace_convert_substrings),
tp/Texinfo/XS/main/translations.c (replace_convert_substrings),
tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_NO_INDEX)
(conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/api.c, [...]
77dca8d3f5 is described below
commit 77dca8d3f56570f2026899c1fbdb80d5da17a510
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri May 17 18:35:43 2024 +0200
* doc/texinfo.texi (Global Customization Variables),
tp/Texinfo/Common.pm (%parser_options), tp/Texinfo/ParserNonXS.pm
(%parser_inner_configuration, _new_macro, _parse_line_command_args),
tp/Texinfo/Translations.pm (_replace_convert_substrings),
tp/Texinfo/XS/main/translations.c (replace_convert_substrings),
tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_NO_INDEX)
(conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/api.c,
tp/Texinfo/XS/parsetexi/conf.c (conf_set_NO_INDEX)
(conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/conf.h (CONF),
tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args),
tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry),
tp/Texinfo/XS/parsetexi/macro.c (new_macro),
tp/Texinfo/XS/parsetexi/parser.c (parse_texi): add customization
variables NO_INDEX to ignore index commands and NO_USER_COMMANDS
to ignore @*macro, @alias, @def*index and @definfoenclose. Replace
restricted internal variable and associated variables and functions by
setting those two variables for translations.
---
ChangeLog | 23 ++++++++++++++++++++++-
doc/texinfo.texi | 10 ++++++++++
tp/Texinfo/Common.pm | 4 ++++
tp/Texinfo/ParserNonXS.pm | 20 +++++++++-----------
tp/Texinfo/Translations.pm | 5 +++--
tp/Texinfo/XS/main/translations.c | 9 +++++++--
tp/Texinfo/XS/parsetexi/Parsetexi.pm | 6 ++++--
tp/Texinfo/XS/parsetexi/Parsetexi.xs | 8 ++++++--
tp/Texinfo/XS/parsetexi/api.c | 6 ------
tp/Texinfo/XS/parsetexi/api.h | 1 -
tp/Texinfo/XS/parsetexi/conf.c | 16 ++++++++++++++++
tp/Texinfo/XS/parsetexi/conf.h | 4 ++++
tp/Texinfo/XS/parsetexi/end_line.c | 10 +++++-----
tp/Texinfo/XS/parsetexi/indices.c | 2 +-
tp/Texinfo/XS/parsetexi/macro.c | 2 +-
tp/Texinfo/XS/parsetexi/parser.c | 9 +--------
tp/Texinfo/XS/parsetexi/parser.h | 1 -
17 files changed, 93 insertions(+), 43 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ffd57a7e55..330f7021cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2024-05-17 Patrice Dumas <pertusus@free.fr>
+
+ * doc/texinfo.texi (Global Customization Variables),
+ tp/Texinfo/Common.pm (%parser_options), tp/Texinfo/ParserNonXS.pm
+ (%parser_inner_configuration, _new_macro, _parse_line_command_args),
+ tp/Texinfo/Translations.pm (_replace_convert_substrings),
+ tp/Texinfo/XS/main/translations.c (replace_convert_substrings),
+ tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
+ tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_NO_INDEX)
+ (conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/api.c,
+ tp/Texinfo/XS/parsetexi/conf.c (conf_set_NO_INDEX)
+ (conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/conf.h (CONF),
+ tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args),
+ tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry),
+ tp/Texinfo/XS/parsetexi/macro.c (new_macro),
+ tp/Texinfo/XS/parsetexi/parser.c (parse_texi): add customization
+ variables NO_INDEX to ignore index commands and NO_USER_COMMANDS
+ to ignore @*macro, @alias, @def*index and @definfoenclose. Replace
+ restricted internal variable and associated variables and functions by
+ setting those two variables for translations.
+
2024-05-17 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/ParserNonXS.pm (_initialize_parsing, get_parser_info)
@@ -7,7 +28,7 @@
(_handle_block_command, _parse_texi, _parse_line_command_args),
tp/Texinfo/Document.pm (new_document): setup the document in
_initialize_parsing, by calling a new function in Texinfo::Document,
- new_document. Associate the document to the parser as the docuemnt
+ new_document. Associate the document to the parser as the document
key. Set directly in the document the information registered in the
document in the parser. Remove tp/Texinfo/Document.pm register
function.
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index f44840a919..f19c08a72d 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -15689,6 +15689,16 @@ It is also used for command-line argument passed to
commands called from
@command{texi2any}. For example, @command{latex2html} will be called from
@command{texi2any} if @code{HTML_MATH} is set to @samp{l2h}.
+@item NO_INDEX
+If set, index entries are not recorded and @@-commands related to
+indices, such as @code{@@printindex}, @code{@@synindex} or @code{@@defindex}
+have no effect. Default false.
+
+@item NO_USER_COMMANDS
+If set, definitions of user-defined @@-command are ignored. @code{@@alias},
+@code{@@definfoenclose}, @code{@@defindex}, @code{@@macro} and similar
+@@-commands have no effect. Default false.
+
@item OUTPUT_ENCODING_NAME
Normalized encoding name used for output files. Should be a usable
charset name in HTML, typically one of the preferred IANA encoding
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index b5dff6f2e7..690888f2d5 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -150,6 +150,10 @@ my %parser_options = (
'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME' => 1,
'CPP_LINE_DIRECTIVES' => 1, # handle cpp like synchronization lines
'MAX_MACRO_CALL_NESTING' => 100000, # max number of nested macro calls
+ 'NO_INDEX' => 0, # if set, do not record index entries and ignore
+ # index related @-commands
+ 'NO_USER_COMMANDS' => 0, # if set, ignore @*macro, @def*index, @alias and
+ # @definfoenclose
);
# this serves both to set defaults and list customization variable
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 4f6819b718..6b0a344fb5 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -112,8 +112,9 @@ our $VERSION = '7.1dev';
# Document information set in the parser. The initialization is done by
-# Texinfo::Document::new_document but afterwards the document and
-# keys are directly accessed in the parser for efficiency
+# Texinfo::Document::new_document and afterwards the Texinfo::Document
+# document is available in the 'document' key in the parser and
+# document hash keys are directly accessed in the parser for efficiency
#'commands_info' => {}, # keys are @-commands names (without @) and
# values are arrays for global multiple
# @-commands and a value for non multiple
@@ -255,8 +256,6 @@ my %parser_inner_configuration = (
'accept_internalvalue' => 0, # whether @txiinternalvalue should be added
# to the tree or considered invalid.
# currently set if called by gdt.
- 'restricted' => 0, # cannot define new commands or make index
- # entries. currently set when called from gdt.
);
# expanded_formats_hash each key comes from EXPANDED_FORMATS, value is 1
@@ -1259,7 +1258,6 @@ sub _place_source_mark
." $add_element_string ".Texinfo::Common::debug_print_element($mark_element)
.' '.Texinfo::Common::debug_print_element($element)."\n"
if ($self->{'DEBUG'});
- ;
if (!$mark_element->{'source_marks'}) {
$mark_element->{'source_marks'} = [];
@@ -6692,7 +6690,7 @@ sub _new_macro($$$)
my $name = shift;
my $current = shift;
- return if $self->{'restricted'};
+ return if $self->{'NO_USER_COMMANDS'};
my $macrobody;
if (defined($current->{'contents'})) {
@@ -7746,7 +7744,7 @@ sub _parse_line_command_args($$$)
if ($command eq 'alias') {
# REMACRO
- if ($self->{'restricted'}) {
+ if ($self->{'NO_USER_COMMANDS'}) {
# do nothing
} elsif ($line =~
s/^([[:alnum:]][[:alnum:]-]*)(\s*=\s*)([[:alnum:]][[:alnum:]-]*)$//) {
my $new_command = $1;
@@ -7778,7 +7776,7 @@ sub _parse_line_command_args($$$)
} elsif ($command eq 'definfoenclose') {
# REMACRO
# FIXME how to handle non ascii space? As space or in argument?
- if ($self->{'restricted'}) {
+ if ($self->{'NO_USER_COMMANDS'}) {
# do nothing
} elsif ($line =~
s/^([[:alnum:]][[:alnum:]\-]*)\s*,\s*([^\s,]*)\s*,\s*([^\s,]*)$//) {
$args = [$1, $2, $3 ];
@@ -7841,7 +7839,7 @@ sub _parse_line_command_args($$$)
}
} elsif ($command eq 'defindex' || $command eq 'defcodeindex') {
# REMACRO
- if ($self->{'restricted'}) {
+ if ($self->{'NO_USER_COMMANDS'} or $self->{'NO_INDEX'}) {
# do nothing
} elsif ($line =~ /^([[:alnum:]][[:alnum:]\-]*)$/) {
my $name = $1;
@@ -7879,7 +7877,7 @@ sub _parse_line_command_args($$$)
} elsif ($command eq 'synindex' || $command eq 'syncodeindex') {
# REMACRO
if ($line =~
/^([[:alnum:]][[:alnum:]\-]*)\s+([[:alnum:]][[:alnum:]\-]*)$/) {
- if ($self->{'restricted'}) {
+ if ($self->{'NO_INDEX'}) {
# do nothing
} else {
my $document = $self->{'document'};
@@ -7916,7 +7914,7 @@ sub _parse_line_command_args($$$)
$command, $line), $source_info);
}
} elsif ($command eq 'printindex') {
- if ($self->{'restricted'}) {
+ if ($self->{'NO_INDEX'}) {
# do nothing
# REMACRO
} elsif ($line =~ /^([[:alnum:]][[:alnum:]\-]*)$/) {
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index f30051e512..e3e0536994 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -311,8 +311,9 @@ sub _replace_convert_substrings($;$$)
# accept @txiinternalvalue as a valid Texinfo command, used to mark
# location in tree of substituted brace enclosed strings.
my $parser_conf = {'accept_internalvalue' => 1,
- # Flag to say that some parts of the parser should not be modified.
- 'restricted' => 1};
+ # Ignore index and user-defined commands.
+ 'NO_INDEX' => 1,
+ 'NO_USER_COMMANDS' => 1,};
# set parser debug level to one less than $debug_level
if (defined($debug_level)) {
diff --git a/tp/Texinfo/XS/main/translations.c
b/tp/Texinfo/XS/main/translations.c
index 24ebcc5934..e561b4e5a9 100644
--- a/tp/Texinfo/XS/main/translations.c
+++ b/tp/Texinfo/XS/main/translations.c
@@ -36,6 +36,7 @@
#include "tree.h"
#include "errors_parser.h"
#include "debug.h"
+#include "conf.h"
#include "api.h"
#include "document.h"
#include "convert_to_texinfo.h"
@@ -432,6 +433,8 @@ replace_convert_substrings (char *translated_string,
int document_descriptor;
int parser_debug_level = 0;
int previous_debug_level;
+ int previous_no_index;
+ int previous_no_user_commands;
DOCUMENT *document;
if (replaced_substrings)
@@ -475,7 +478,8 @@ replace_convert_substrings (char *translated_string,
location in tree of substituted brace enclosed strings.
*/
parser_set_accept_internalvalue (1);
- parser_set_restricted (1);
+ previous_no_index = conf_set_NO_INDEX (1);
+ previous_no_user_commands = conf_set_NO_USER_COMMANDS (1);
document_descriptor = parse_string (texinfo_line, 1);
@@ -496,7 +500,8 @@ replace_convert_substrings (char *translated_string,
clear_document_parser_errors (document_descriptor);
parser_set_accept_internalvalue (0);
- parser_set_restricted (0);
+ conf_set_NO_INDEX (previous_no_index);
+ conf_set_NO_USER_COMMANDS (previous_no_user_commands);
parser_set_debug (previous_debug_level);
if (replaced_substrings)
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index cf8b21cbd2..8dcaa1295d 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -134,6 +134,10 @@ sub parser (;$$)
conf_set_CPP_LINE_DIRECTIVES($conf->{$key});
} elsif ($key eq 'MAX_MACRO_CALL_NESTING') {
conf_set_MAX_MACRO_CALL_NESTING($conf->{$key});
+ } elsif ($key eq 'NO_INDEX') {
+ conf_set_NO_INDEX($conf->{$key});
+ } elsif ($key eq 'NO_USER_COMMANDS') {
+ conf_set_NO_USER_COMMANDS($conf->{$key});
} elsif ($key eq 'DOC_ENCODING_FOR_INPUT_FILE_NAME') {
parser_set_DOC_ENCODING_FOR_INPUT_FILE_NAME ($conf->{$key});
} elsif ($key eq 'INPUT_FILE_NAME_ENCODING' and defined($conf->{$key})) {
@@ -144,8 +148,6 @@ sub parser (;$$)
parser_set_locale_encoding ($utf8_bytes);
} elsif ($key eq 'accept_internalvalue' and $conf->{$key}) {
parser_set_accept_internalvalue(1);
- } elsif ($key eq 'restricted' and $conf->{$key}) {
- parser_set_restricted(1);
} elsif ($key eq 'registrar' or $key eq 'COMMAND_LINE_ENCODING'
or $key eq 'DEBUG') {
# no action needed, already taken into account or only for Perl code
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index dc5690d66a..3ab533de41 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -132,6 +132,12 @@ conf_set_IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME (int i)
void
conf_set_MAX_MACRO_CALL_NESTING (int i)
+int
+conf_set_NO_INDEX (int i)
+
+int
+conf_set_NO_USER_COMMANDS (int i)
+
void
parser_set_DOC_ENCODING_FOR_INPUT_FILE_NAME (int i)
@@ -153,6 +159,4 @@ parser_set_debug (int i)
void
parser_set_accept_internalvalue (int value)
-void
-parser_set_restricted (int value)
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index 9cde97af71..334adf00b9 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -122,7 +122,6 @@ reset_parser (int local_debug_output)
set_locale_encoding (0);
global_accept_internalvalue = 0;
- global_restricted = 0;
}
/* Determine directory path based on file name.
@@ -269,8 +268,3 @@ parser_set_accept_internalvalue (int value)
set_accept_internalvalue (value);
}
-void
-parser_set_restricted (int value)
-{
- set_restricted (value);
-}
diff --git a/tp/Texinfo/XS/parsetexi/api.h b/tp/Texinfo/XS/parsetexi/api.h
index 30d82b68af..83df805a76 100644
--- a/tp/Texinfo/XS/parsetexi/api.h
+++ b/tp/Texinfo/XS/parsetexi/api.h
@@ -18,7 +18,6 @@ void parser_add_include_directory (const char *filename);
void parser_add_expanded_format (const char *format);
void parser_clear_expanded_formats (void);
void parser_set_accept_internalvalue (int value);
-void parser_set_restricted (int value);
void parser_set_DOC_ENCODING_FOR_INPUT_FILE_NAME (int i);
void parser_set_input_file_name_encoding (const char *value);
void parser_set_locale_encoding (const char *value);
diff --git a/tp/Texinfo/XS/parsetexi/conf.c b/tp/Texinfo/XS/parsetexi/conf.c
index bc74143b1d..4842af566c 100644
--- a/tp/Texinfo/XS/parsetexi/conf.c
+++ b/tp/Texinfo/XS/parsetexi/conf.c
@@ -46,6 +46,22 @@ conf_set_MAX_MACRO_CALL_NESTING (int i)
conf.max_macro_call_nesting = i;
}
+int
+conf_set_NO_INDEX (int i)
+{
+ int previous = conf.no_index;
+ conf.no_index = i;
+ return previous;
+}
+
+int
+conf_set_NO_USER_COMMANDS (int i)
+{
+ int previous = conf.no_user_commands;
+ conf.no_user_commands = i;
+ return previous;
+}
+
void
reset_conf (void)
{
diff --git a/tp/Texinfo/XS/parsetexi/conf.h b/tp/Texinfo/XS/parsetexi/conf.h
index cf300bac48..0fd6dd8fb2 100644
--- a/tp/Texinfo/XS/parsetexi/conf.h
+++ b/tp/Texinfo/XS/parsetexi/conf.h
@@ -21,6 +21,8 @@ typedef struct CONF {
int cpp_line_directives;
int ignore_space_after_braced_command_name;
int max_macro_call_nesting;
+ int no_index;
+ int no_user_commands;
} CONF;
extern CONF conf;
@@ -30,6 +32,8 @@ void conf_set_show_menu (int i);
void conf_set_CPP_LINE_DIRECTIVES (int i);
void conf_set_IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME (int i);
void conf_set_MAX_MACRO_CALL_NESTING (int i);
+int conf_set_NO_INDEX (int i);
+int conf_set_NO_USER_COMMANDS (int i);
void reset_conf (void);
diff --git a/tp/Texinfo/XS/parsetexi/end_line.c
b/tp/Texinfo/XS/parsetexi/end_line.c
index 189bff28da..19922d2dfb 100644
--- a/tp/Texinfo/XS/parsetexi/end_line.c
+++ b/tp/Texinfo/XS/parsetexi/end_line.c
@@ -131,7 +131,7 @@ parse_line_command_args (ELEMENT *line_command)
{
case CM_alias:
{
- if (global_restricted)
+ if (conf.no_user_commands)
break;
/* @alias NEW = EXISTING */
char *new = 0, *existing = 0;
@@ -210,7 +210,7 @@ parse_line_command_args (ELEMENT *line_command)
}
case CM_definfoenclose:
{
- if (global_restricted)
+ if (conf.no_user_commands)
break;
/* @definfoenclose phoo,//,\\ */
@@ -333,7 +333,7 @@ parse_line_command_args (ELEMENT *line_command)
case CM_defindex:
case CM_defcodeindex:
{
- if (global_restricted)
+ if (conf.no_user_commands || conf.no_index)
break;
char *name = 0;
@@ -401,7 +401,7 @@ parse_line_command_args (ELEMENT *line_command)
if (*p)
goto synindex_invalid; /* More at end of line. */
- if (global_restricted)
+ if (conf.no_index)
{
free (index_name_from);
free (index_name_to);
@@ -455,7 +455,7 @@ parse_line_command_args (ELEMENT *line_command)
arg = read_command_name (&p);
if (!arg || *p)
line_error ("bad argument to @printindex: %s", line);
- else if (global_restricted)
+ else if (conf.no_index)
{}
else
{
diff --git a/tp/Texinfo/XS/parsetexi/indices.c
b/tp/Texinfo/XS/parsetexi/indices.c
index 1d40aaeddf..9503830c53 100644
--- a/tp/Texinfo/XS/parsetexi/indices.c
+++ b/tp/Texinfo/XS/parsetexi/indices.c
@@ -253,7 +253,7 @@ enter_index_entry (enum command_id index_type_cmd,
INDEX_ENTRY *entry;
TEXT ignored_chars;
- if (global_restricted)
+ if (conf.no_index)
return;
idx = index_of_command (index_type_cmd);
diff --git a/tp/Texinfo/XS/parsetexi/macro.c b/tp/Texinfo/XS/parsetexi/macro.c
index 69d5916671..bb58a1749d 100644
--- a/tp/Texinfo/XS/parsetexi/macro.c
+++ b/tp/Texinfo/XS/parsetexi/macro.c
@@ -68,7 +68,7 @@ new_macro (char *name, ELEMENT *macro)
MACRO *m = 0;
size_t free_slot = 0;
- if (global_restricted)
+ if (conf.no_user_commands)
return;
/* Check for an existing definition first for us to overwrite. */
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 3098251cc1..a74d7e7af7 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -319,7 +319,6 @@ char *global_clickstyle = 0;
char *global_documentlanguage = 0;
int global_documentlanguage_fixed = 0;
int global_accept_internalvalue = 0;
-int global_restricted = 0;
enum kbd_enum global_kbdinputstyle = kbd_distinct;
@@ -349,12 +348,6 @@ set_accept_internalvalue (int value)
global_accept_internalvalue = value;
}
-void
-set_restricted (int value)
-{
- global_restricted = value;
-}
-
/* Record the information from a command of global effect. */
int
register_global_command (ELEMENT *current)
@@ -2633,7 +2626,7 @@ parse_texi (ELEMENT *root_elt, ELEMENT *current_elt)
/* done here and not in reset_parser_except_conf as usually done
as restricted is set after reset_parser_except_conf and before
calling parsing functions */
- if (!global_restricted)
+ if (!conf.no_index)
init_index_commands ();
/* Read input file line-by-line. */
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index e9c146dfeb..a50b790d22 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -133,7 +133,6 @@ extern char *global_clickstyle;
extern char *global_documentlanguage;
extern int global_documentlanguage_fixed;
extern int global_accept_internalvalue;
-extern int global_restricted;
enum kbd_enum {kbd_none, kbd_code, kbd_example, kbd_distinct };
extern enum kbd_enum global_kbdinputstyle;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * doc/texinfo.texi (Global Customization Variables), tp/Texinfo/Common.pm (%parser_options), tp/Texinfo/ParserNonXS.pm (%parser_inner_configuration, _new_macro, _parse_line_command_args), tp/Texinfo/Translations.pm (_replace_convert_substrings), tp/Texinfo/XS/main/translations.c (replace_convert_substrings), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser), tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_NO_INDEX) (conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/api.c, tp/Texinfo/XS/parset [...],
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_initialize_parsing, get_parser_info) (parse_texi_file, _register_global_command, _enter_index_entry) (_end_line_misc_line, _end_line_starting_block) (_check_register_target_element_label, _handle_line_command) (_handle_block_command, _parse_texi, _parse_line_command_args), tp/Texinfo/Document.pm (new_document): setup the document in _initialize_parsing, by calling a new function in Texinfo::Document, new_document. Associate the document to the parser as the d [...]
- Next by Date:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_initialize_parsing): update parser initialization for NO_INDEX and NO_USER_COMMANDS.
- Previous by thread:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_initialize_parsing, get_parser_info) (parse_texi_file, _register_global_command, _enter_index_entry) (_end_line_misc_line, _end_line_starting_block) (_check_register_target_element_label, _handle_line_command) (_handle_block_command, _parse_texi, _parse_line_command_args), tp/Texinfo/Document.pm (new_document): setup the document in _initialize_parsing, by calling a new function in Texinfo::Document, new_document. Associate the document to the parser as the d [...]
- Next by thread:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_initialize_parsing): update parser initialization for NO_INDEX and NO_USER_COMMANDS.
- Index(es):