summaryrefslogtreecommitdiff
path: root/tex/context/base/char-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-06-07 13:11:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-06-07 13:11:00 +0200
commit5b6956e57c33bd35c0ac1e4118cdb1b183d77499 (patch)
treea1b9df0b29db98293962b2cc304a7ca5d58f99ff /tex/context/base/char-ini.lua
parent2ccf824cf6614b771c4dd47bd09e7d4f1a59f271 (diff)
downloadcontext-5b6956e57c33bd35c0ac1e4118cdb1b183d77499.tar.gz
beta 2009.06.07 13:11
Diffstat (limited to 'tex/context/base/char-ini.lua')
-rw-r--r--tex/context/base/char-ini.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua
index 974366b7a..ff42d91ee 100644
--- a/tex/context/base/char-ini.lua
+++ b/tex/context/base/char-ini.lua
@@ -401,7 +401,8 @@ function characters.define(tobelettered, tobeactivated) -- catcodetables
-- we can use a macro instead of direct settings
local fallback = chr.fallback
if fallback then
- texprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\checkedchar{",u,"}{",fallback,"}}}")
+ -- texprint(format("{\\catcode %s=13\\unexpanded\\gdef %s{\\checkedchar{%s}{%s}}}",u,utfchar(u),u,fallback))
+ texsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\checkedchar{",u,"}{",fallback,"}}}") -- no texprint
activated[#activated+1] = "\\c"..u.."\\a"
else
local contextname = chr.contextname
@@ -411,15 +412,18 @@ function characters.define(tobelettered, tobeactivated) -- catcodetables
-- by this time, we're still in normal catcode mode
-- subtle: not "\\",contextname but "\\"..contextname
if chr.unicodeslot < 128 then
- texprint(ctxcatcodes, "\\chardef\\"..contextname,"=",u)
+ -- texprint(ctxcatcodes, "\\chardef\\"..contextname,"=",u)
+ texprint(ctxcatcodes,format("\\chardef\\%s=%s",contextname,u))
else
- texprint(ctxcatcodes, "\\let\\"..contextname,"=",utfchar(u))
+ -- texprint(ctxcatcodes, "\\let\\"..contextname,"=",utfchar(u))
+ texprint(ctxcatcodes,format("\\let\\%s=%s",contextname,utfchar(u)))
if is_letter[category] then
lettered[#lettered+1] = "\\c"..u.."\\l"
end
end
elseif is_command[category] then
- texprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\"..contextname,"}}")
+ -- texprint(format("{\\catcode %s=13\\unexpanded\\gdef %s{\\%s}}",u,utfchar(u),contextname))
+ texsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\"..contextname,"}}") -- no texprint
activated[#activated+1] = "\\c"..u.."\\a"
end
elseif is_letter[category] then