Don't hardcode \immediate flag value and move custom functions into table

This commit is contained in:
Marcel Fabian Krüger 2021-11-06 13:23:29 +01:00
parent d61bb927a3
commit 32c5de7db7
7 changed files with 79 additions and 66 deletions

View file

@ -4,12 +4,13 @@
-- Necessary especially for etoolbox's patching commands
local lmlt = luametalatex
local primitive_meaning = {
token.primitive_tokens.expandafter,
token.primitive_tokens.relax,
token.primitive_tokens.meaning,
lmlt.primitive_tokens.expandafter,
lmlt.primitive_tokens.relax,
lmlt.primitive_tokens.meaning,
}
token.luacmd("meaning", function()
lmlt.luacmd("meaning", function()
local peeked = token.peeknext()
token.put_next(primitive_meaning)
token.skipnextexpanded()