[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7527] remove MACRO_BODY_IGNORES_LEADING_SPACE
From: |
gavinsmith0123 |
Subject: |
[7527] remove MACRO_BODY_IGNORES_LEADING_SPACE |
Date: |
Mon, 21 Nov 2016 16:48:08 +0000 (UTC) |
Revision: 7527
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7527
Author: gavin
Date: 2016-11-21 16:48:08 +0000 (Mon, 21 Nov 2016)
Log Message:
-----------
remove MACRO_BODY_IGNORES_LEADING_SPACE
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.texi
trunk/tp/Texinfo/Common.pm
trunk/tp/Texinfo/Parser.pm
trunk/tp/t/60macro.t
Removed Paths:
-------------
trunk/tp/t/results/macro/leading_spaces_ignore.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-11-21 09:51:08 UTC (rev 7526)
+++ trunk/ChangeLog 2016-11-21 16:48:08 UTC (rev 7527)
@@ -1,3 +1,24 @@
+2016-11-21 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Common.pm (@obsolete_variables): Add
+ 'MACRO_BODY_IGNORES_LEADING_SPACE'.
+ (@variable_string_settables): Remove the same.
+
+ * tp/Texinfo/Parser.pm (%default_customization_values): Remove
+ 'MACRO_BODY_IGNORES_LEADING_SPACE'.
+ (_strip_macrobody_leading_space): Remove function.
+ * tp/t/60macro.t (leading_spaces_ignore): Remove test.
+
+ * doc/texinfo.texi (Other Customization Variables): Remove
+ mention of this variable.
+
+ The 'MACRO_BODY_IGNORES_LEADING_SPACE' variable attempted to
+ match a failing of the implementation of macros in texinfo.tex
+ where spaces at the start of a line could be ignored, but it
+ didn't match it perfectly: specifically, a macro used inside
+ a command like @example where the catcode of space had been
+ changed didn't have leading spaces skipped.
+
2016-11-20 Gavin Smith <address@hidden>
* tp/Texinfo/Parser.pm (_parse_macro_command_line): Permit _ in
Modified: trunk/doc/texinfo.texi
===================================================================
--- trunk/doc/texinfo.texi 2016-11-21 09:51:08 UTC (rev 7526)
+++ trunk/doc/texinfo.texi 2016-11-21 16:48:08 UTC (rev 7527)
@@ -17285,10 +17285,6 @@
to use that variable, since it is set by @code{@@documentencoding}
(@address@hidden@@documentencoding}}).
address@hidden MACRO_BODY_IGNORES_LEADING_SPACE
-Ignore white space at the beginning of user defined macro body line,
-mimicking a @TeX{} limitation (@pxref{Macro Details}). Default off.
-
@item MAX_MACRO_CALL_NESTING
The maximal number of recursive calls of @@-commands defined through
@code{@@rmacro}; default 100000. The purpose of this variable is to
Modified: trunk/tp/Texinfo/Common.pm
===================================================================
--- trunk/tp/Texinfo/Common.pm 2016-11-21 09:51:08 UTC (rev 7526)
+++ trunk/tp/Texinfo/Common.pm 2016-11-21 16:48:08 UTC (rev 7527)
@@ -204,8 +204,8 @@
'IDX_SUMMARY', 'I18N_PERL_HASH', 'USE_UNICODE', 'USE_NLS',
'USE_UP_FOR_ADJACENT_NODES', 'SEPARATE_DESCRIPTION',
'NEW_CROSSREF_STYLE', 'SHORT_REF', 'IGNORE_PREAMBLE_TEXT',
- 'OUT_ENCODING',
- 'IN_ENCODING', 'DEFAULT_ENCODING');
+ 'OUT_ENCODING', 'IN_ENCODING', 'DEFAULT_ENCODING',
+ 'MACRO_BODY_IGNORES_LEADING_SPACE');
my @variable_settables_not_used = ('COMPLETE_IMAGE_PATHS', 'TOC_FILE',
'SPLIT_INDEX');
@@ -254,8 +254,8 @@
'KEEP_TOP_EXTERNAL_REF',
'TEXI2HTML', 'IMAGE_LINK_PREFIX', 'FIX_TEXINFO',
'TREE_TRANSFORMATIONS', 'BASEFILENAME_LENGTH',
- 'TEXTCONTENT_COMMENT', 'XREF_USE_FLOAT_LABEL', 'XREF_USE_NODE_NAME_ARG',
- 'MACRO_BODY_IGNORES_LEADING_SPACE', 'CHECK_HTMLXREF',
+ 'TEXTCONTENT_COMMENT', 'XREF_USE_FLOAT_LABEL',
+ 'XREF_USE_NODE_NAME_ARG', 'CHECK_HTMLXREF',
'TEXINFO_DTD_VERSION', 'TEXINFO_OUTPUT_FORMAT',
'INFO_SPECIAL_CHARS_WARNING',
'INDEX_SPECIAL_CHARS_WARNING', 'INFO_SPECIAL_CHARS_QUOTE',
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2016-11-21 09:51:08 UTC (rev 7526)
+++ trunk/tp/Texinfo/Parser.pm 2016-11-21 16:48:08 UTC (rev 7527)
@@ -104,7 +104,6 @@
'SHOW_MENU' => 1, # if false no menu error related.
'INLINE_INSERTCOPYING' => 0,
'IGNORE_BEFORE_SETFILENAME' => 1,
- 'MACRO_BODY_IGNORES_LEADING_SPACE' => 0,
'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME' => 1,
'INPUT_PERL_ENCODING' => undef, # input perl encoding name, set from
# @documentencoding in the default case
@@ -2594,16 +2593,6 @@
}
}
-sub _strip_macrobody_leading_space($$)
-{
- my $self = shift;
- my $text = shift;
- if ($self->{'MACRO_BODY_IGNORES_LEADING_SPACE'}) {
- $text =~ s/^\s*//mg;
- }
- return $text;
-}
-
# close constructs and do stuff at end of line (or end of the document)
sub _end_line($$$);
sub _end_line($$$)
@@ -3318,7 +3307,7 @@
{ 'element' => {
'args' => [{'text' => 'insertcopying', 'type' =>
'macro_name'}],
'cmdname' => 'macro', },
- 'macrobody' => $self->_strip_macrobody_leading_space($body)
+ 'macrobody' => $body
};
$inline_copying = 1;
print STDERR "INLINE_INSERTCOPYING as macro\n" if
($self->{'DEBUG'});
@@ -3786,9 +3775,8 @@
or ($current->{'parent'}->{'cmdname'} ne 'macro'
and $current->{'parent'}->{'cmdname'} ne 'rmacro'))) {
my $macrobody =
- $self->_strip_macrobody_leading_space(
Texinfo::Convert::Texinfo::convert({ 'contents'
- => $current->{'contents'} }));
+ => $current->{'contents'} });
if ($current->{'args'} and $current->{'args'}->[0]) {
my $name = $current->{'args'}->[0]->{'text'};
if (exists($self->{'macros'}->{$name})) {
@@ -6059,10 +6047,6 @@
If set, spaces after an @-command name that take braces are ignored.
Default on.
-=item MACRO_BODY_IGNORES_LEADING_SPACE
-
-If set, leading spaces are stripped from user-defined macro bodies.
-
=item MAX_MACRO_CALL_NESTING
Maximal number of nested user-defined macro calls. Default is 100000.
Modified: trunk/tp/t/60macro.t
===================================================================
--- trunk/tp/t/60macro.t 2016-11-21 09:51:08 UTC (rev 7526)
+++ trunk/tp/t/60macro.t 2016-11-21 16:48:08 UTC (rev 7527)
@@ -956,14 +956,6 @@
@mymacro{}
'],
-['leading_spaces_ignore',
-'@macro mymacro
- Some here
- text
address@hidden macro
-
address@hidden
-', {'MACRO_BODY_IGNORES_LEADING_SPACE' => 1}],
['form_feeds',
'@macro mymacro{a, b}
f \a\ n \b\
Deleted: trunk/tp/t/results/macro/leading_spaces_ignore.pl
===================================================================
--- trunk/tp/t/results/macro/leading_spaces_ignore.pl 2016-11-21 09:51:08 UTC
(rev 7526)
+++ trunk/tp/t/results/macro/leading_spaces_ignore.pl 2016-11-21 16:48:08 UTC
(rev 7527)
@@ -1,113 +0,0 @@
-use vars qw(%result_texis %result_texts %result_trees %result_errors
- %result_indices %result_sectioning %result_nodes %result_menus
- %result_floats %result_converted %result_converted_errors
- %result_elements %result_directions_text);
-
-use utf8;
-
-$result_trees{'leading_spaces_ignore'} = {
- 'contents' => [
- {
- 'args' => [
- {
- 'parent' => {},
- 'text' => 'mymacro',
- 'type' => 'macro_name'
- }
- ],
- 'cmdname' => 'macro',
- 'contents' => [
- {
- 'parent' => {},
- 'text' => ' Some here
-',
- 'type' => 'raw'
- },
- {
- 'parent' => {},
- 'text' => ' text',
- 'type' => 'raw'
- },
- {
- 'parent' => {},
- 'text' => '
-',
- 'type' => 'last_raw_newline'
- }
- ],
- 'extra' => {
- 'arg_line' => ' mymacro
-'
- },
- 'line_nr' => {
- 'file_name' => '',
- 'line_nr' => 1,
- 'macro' => ''
- },
- 'parent' => {}
- },
- {
- 'extra' => {
- 'command' => {}
- },
- 'parent' => {},
- 'text' => '
-',
- 'type' => 'empty_line_after_command'
- },
- {
- 'parent' => {},
- 'text' => '
-',
- 'type' => 'empty_line'
- },
- {
- 'contents' => [
- {
- 'parent' => {},
- 'text' => 'Some here
-'
- },
- {
- 'parent' => {},
- 'text' => 'text
-'
- }
- ],
- 'parent' => {},
- 'type' => 'paragraph'
- }
- ],
- 'type' => 'text_root'
-};
-$result_trees{'leading_spaces_ignore'}{'contents'}[0]{'args'}[0]{'parent'} =
$result_trees{'leading_spaces_ignore'}{'contents'}[0];
-$result_trees{'leading_spaces_ignore'}{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'leading_spaces_ignore'}{'contents'}[0];
-$result_trees{'leading_spaces_ignore'}{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'leading_spaces_ignore'}{'contents'}[0];
-$result_trees{'leading_spaces_ignore'}{'contents'}[0]{'contents'}[2]{'parent'}
= $result_trees{'leading_spaces_ignore'}{'contents'}[0];
-$result_trees{'leading_spaces_ignore'}{'contents'}[0]{'parent'} =
$result_trees{'leading_spaces_ignore'};
-$result_trees{'leading_spaces_ignore'}{'contents'}[1]{'extra'}{'command'} =
$result_trees{'leading_spaces_ignore'}{'contents'}[0];
-$result_trees{'leading_spaces_ignore'}{'contents'}[1]{'parent'} =
$result_trees{'leading_spaces_ignore'};
-$result_trees{'leading_spaces_ignore'}{'contents'}[2]{'parent'} =
$result_trees{'leading_spaces_ignore'};
-$result_trees{'leading_spaces_ignore'}{'contents'}[3]{'contents'}[0]{'parent'}
= $result_trees{'leading_spaces_ignore'}{'contents'}[3];
-$result_trees{'leading_spaces_ignore'}{'contents'}[3]{'contents'}[1]{'parent'}
= $result_trees{'leading_spaces_ignore'}{'contents'}[3];
-$result_trees{'leading_spaces_ignore'}{'contents'}[3]{'parent'} =
$result_trees{'leading_spaces_ignore'};
-
-$result_texis{'leading_spaces_ignore'} = '@macro mymacro
- Some here
- text
address@hidden macro
-
-Some here
-text
-';
-
-
-$result_texts{'leading_spaces_ignore'} = '
-Some here
-text
-';
-
-$result_errors{'leading_spaces_ignore'} = [];
-
-
-1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7527] remove MACRO_BODY_IGNORES_LEADING_SPACE,
gavinsmith0123 <=