[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Common.pm Texinfo/Parse...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Common.pm Texinfo/Parse... |
Date: |
Wed, 09 Feb 2011 22:19:30 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/02/09 22:19:30
Modified files:
tp : TODO
tp/Texinfo : Common.pm Parser.pm
Log message:
Add @urefbreakstyle.
Simplify code for other commands argument checking.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.80&r2=1.81
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.193&r2=1.194
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- TODO 9 Feb 2011 21:08:34 -0000 1.80
+++ TODO 9 Feb 2011 22:19:30 -0000 1.81
@@ -15,9 +15,6 @@
@Â protecting end of lines in @def* is not kept in any way in the tree.
Maybe it could be possible to have it as a 'type'?
-Add
address@hidden after|before|none
-
test @anchor, @footnote and @cindex in @caption with @listoffloats.
for i18n, one want to do something like
Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- Texinfo/Common.pm 31 Jan 2011 00:37:21 -0000 1.10
+++ Texinfo/Common.pm 9 Feb 2011 22:19:30 -0000 1.11
@@ -126,6 +126,7 @@
'allowcodebreaks' => 1, # false or true
'exampleindent' => 1, # asis or a number
'footnotestyle' => 1, # end and separate, nothing else on the line
+ 'urefbreakstyle' => 1, # after|before|none
'afourpaper' => 'skipline', # no arg
'afivepaper' => 'skipline', # no arg
'afourlatex' => 'skipline', # no arg
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -b -r1.193 -r1.194
--- Texinfo/Parser.pm 6 Feb 2011 23:44:56 -0000 1.193
+++ Texinfo/Parser.pm 9 Feb 2011 22:19:30 -0000 1.194
@@ -387,7 +387,7 @@
foreach my $global_multiple_command ('author', 'documentlanguage',
'subtitle', 'contents', 'shortcontents', 'summarycontents',
'kbdinputstyle', 'paragraphindent', 'firstparagraphindent',
- 'frenchspacing', 'footnotestyle', 'hyphenation') {
+ 'frenchspacing', 'footnotestyle', 'hyphenation', 'urefbreakstyle') {
$global_multiple_commands{$global_multiple_command} = 1;
}
@@ -4016,26 +4016,25 @@
} elsif (grep {$_ eq $command} ('everyheadingmarks', 'everyfootingmarks',
'evenheadingmarks', 'oddheadingmarks',
'evenfootingmarks', 'oddfootingmarks')) {
- if (($line =~ /^(top)$/) or ($line =~ /^(bottom)$/)) {
- $args = [$1];
+ if ($line eq 'top' or $line eq 'bottom') {
+ $args = [$line];
} else {
$self->line_error (sprintf($self->__("address@hidden arg must be `top'
or `bottom', not `%s'"), $command, $line), $line_nr);
}
} elsif ($command eq 'fonttextsize') {
- if (($line =~ /^(10)$/) or ($line =~ /^(11)$/)) {
- $args = [$1];
+ if ($line eq '10' or $line eq '11') {
+ $args = [$line];
} else {
$self->line_error (sprintf($self->__("Only address@hidden 10 or 11 is
supported, not `%s'"),$command, $line), $line_nr);
}
} elsif ($command eq 'footnotestyle') {
- if ($line =~ /^([a-z]+)$/ and ($1 eq 'separate' or $1 eq 'end')) {
- $args = [$1];
+ if ($line eq 'separate' or $line eq 'end') {
+ $args = [$line];
} else {
$self->line_error (sprintf($self->__("address@hidden arg must be
`separate' or `end', not `%s'"), $command, $line), $line_nr);
}
} elsif ($command eq 'setchapternewpage') {
- if (($line =~ /^(on)$/) or ($line =~ /^(off)$/)
- or ($line =~ /^(odd)$/)) {
+ if ($line eq 'on' or $line eq 'off' or $line eq 'odd') {
$args = [$1];
} else {
$self->line_error (sprintf($self->__("address@hidden arg must be `on',
`off' or `odd', not `%s'"), $command, $line), $line_nr);
@@ -4059,8 +4058,8 @@
$self->line_error (sprintf($self->__("address@hidden arg must be
numeric/`none'/`asis', not `%s'"), $line), $line_nr);
}
} elsif ($command eq 'firstparagraphindent') {
- if (($line =~ /^(none)$/) or ($line =~ /^(insert)$/)) {
- $args = [$1];
+ if ($line eq 'none' or $line eq 'insert') {
+ $args = [$line];
} else {
$self->line_error (sprintf($self->__("address@hidden arg must be `none'
or `insert', not `%s'"), $line), $line_nr);
}
@@ -4073,34 +4072,34 @@
$self->line_error (sprintf($self->__("address@hidden arg must be
numeric/`asis', not `%s'"), $line), $line_nr);
}
} elsif ($command eq 'frenchspacing') {
- if (($line =~ /^(on)$/) or ($line =~ /^(off)$/)) {
- $args = [$1];
+ if ($line eq 'on' or $line eq 'off') {
+ $args = [$line];
} else {
$self->line_error (sprintf($self->__("Expected address@hidden on or off,
not `%s'"), $command, $line), $line_nr);
}
} elsif ($command eq 'kbdinputstyle') {
- if ($line =~ /^([a-z]+)$/ and ($1 eq 'code' or $1 eq 'example' or $1 eq
'distinct')) {
- $args = [$1];
+ if ($line eq 'code' or $line eq 'example' or $line eq 'distinct') {
+ $args = [$line];
} else {
$self->line_error (sprintf($self->__("address@hidden arg must be
`code'/`example'/`distinct', not `%s'"), $line), $line_nr);
}
} elsif ($command eq 'allowcodebreaks') {
- if (($line =~ /^(true)$/) or ($line =~ /^(false)$/)) {
- $args = [$1];
+ if ($line eq 'true' or $line eq 'false') {
+ $args = [$line];
} else {
$self->line_error (sprintf($self->__("address@hidden arg must be `true'
or `false', not `%s'"), $line), $line_nr);
}
- } elsif ($command eq 'headings') {
- my $valid_arg = 0;
- foreach my $possible_arg ('off','on','single','double',
- 'singleafter','doubleafter') {
- if ($line =~ /^($possible_arg)$/) {
- $args = [$1];
- $valid_arg = 1;
- last;
- }
+ } elsif ($command eq 'urefbreakstyle') {
+ if ($line eq 'after' or $line eq 'before' or $line eq 'none') {
+ $args = [$line];
+ } else {
+ $self->line_error (sprintf($self->__("address@hidden arg must be
`after'/`before'/`none', not `%s'"), $line), $line_nr);
}
- unless ($valid_arg) {
+ } elsif ($command eq 'headings') {
+ if ($line eq 'off' or $line eq 'on' or $line eq 'single'
+ or $line eq 'double' or $line eq 'singleafter' or $line eq
'doubleafter') {
+ $args = [$line];
+ } else {
$self->line_error (sprintf($self->__("Bad argument to address@hidden:
%s"), $command, $line), $line_nr);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Common.pm Texinfo/Parse...,
Patrice Dumas <=