From: Matthijs Kooijman Date: Thu, 27 Aug 2009 11:45:19 +0000 (+0200) Subject: Use local variables for storing visualizer dicts. X-Git-Tag: final-thesis~281 X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=commitdiff_plain;h=1687b8573daf7ee73241fa2651ac5bed07c10cdf Use local variables for storing visualizer dicts. Using global variables could cause problems when pretty printers call eachother and use the vis variable. --- diff --git a/pret-lam.lua b/pret-lam.lua index ea07811..ce4ac47 100644 --- a/pret-lam.lua +++ b/pret-lam.lua @@ -6,7 +6,7 @@ local utf = unicode.utf8 -vis = buffers.newvisualizer("lam") +local vis = buffers.newvisualizer("lam") local colors = { "prettytwo", diff --git a/pret-trans.lua b/pret-trans.lua index 238a4e5..6ad51b7 100644 --- a/pret-trans.lua +++ b/pret-trans.lua @@ -9,7 +9,7 @@ local utf = unicode.utf8 -vis = buffers.newvisualizer("trans") +local vis = buffers.newvisualizer("trans") local commands = {} -- A command to create a horizontal rule.