Skip to content

Commit

Permalink
remove redundant \expandafter definition (#2368)
Browse files Browse the repository at this point in the history
* remove redundant \expandafter definition

* remove redundant \relpenalty definition
  • Loading branch information
dginev committed May 29, 2024
1 parent 1438332 commit 40e9fa8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
20 changes: 0 additions & 20 deletions lib/LaTeXML/Engine/TeX_Macro.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -194,26 +194,6 @@ DefPrimitive('\futurelet Token Token Token', sub {
# \expandafter c `<token1><token2>' is equivalent to `<token1> expansion of <token2>'.
# \noexpand c prevents the expansion of the following token.

DefMacro('\expandafter Token Token', sub {
no warnings 'recursion';
my ($gullet, $tok, $xtok) = @_;
my $defn;
if (defined($defn = $STATE->lookupExpandable($xtok))) {
my @x = ();
{
local $LaTeXML::CURRENT_TOKEN = $xtok;
@x = $defn->invoke($gullet, 1); # Expand $xtok ONCE ONLY!
}
($tok, @x); }
elsif (!$STATE->lookupMeaning($xtok)) {
# Undefined token is an error, as expansion is expected.
# BUT The unknown token is NOT consumed, (see TeX B book, item 367)
# since probably in a real TeX run it would have been defined.
$STATE->generateErrorStub($gullet, $xtok);
($tok, $xtok); }
else {
($tok, $xtok); } });

use constant T_expandafter => T_CS('\expandafter');
DefMacro('\expandafter Token Token', sub {
no warnings 'recursion';
Expand Down
1 change: 0 additions & 1 deletion lib/LaTeXML/Engine/TeX_Math.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,6 @@ DefRegister('\belowdisplayshortskip' => Glue('0pt plus 3pt'));

DefRegister('\binoppenalty' => Number(700));
DefRegister('\relpenalty' => Number(500));
DefRegister('\relpenalty' => Number(700));
DefRegister('\displaywidowpenalty' => Number(50));
DefRegister('\predisplaypenalty' => Number(10000));
DefRegister('\postdisplaypenalty' => Number(0));
Expand Down

0 comments on commit 40e9fa8

Please sign in to comment.