1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
$NetBSD: patch-ab,v 1.7 2006/08/14 22:40:53 wiz Exp $
--- de/delib.lua.orig 2004-01-03 00:27:28.000000000 +0000
+++ de/delib.lua
@@ -10,10 +10,10 @@
-- (at your option) any later version.
--
--- This is a slight abuse of the _LOADED variable perhaps, but library-like
+-- This is a slight abuse of the package.loaded variable perhaps, but library-like
-- packages should handle checking if they're loaded instead of confusing
-- the user with require/include differences.
-if _LOADED["delib"] then return end
+if package.loaded["delib"] then return end
local stylecache={}
@@ -35,7 +35,7 @@ local function base_on(name, list)
return false
end
- for k, v in stylecache[list.based_on] do
+ for k, v in pairs(stylecache[list.based_on]) do
if type(k)=="number" then
if type(v)=="table" then
if v.substyle_pattern then
@@ -82,7 +82,7 @@ function de_define_style(name, list)
stylecache[name]=list
- for xscr, rootwin in root_windows() do
+ for xscr, rootwin in pairs(root_windows()) do
if not de_do_define_style(rootwin, name, list) then
break
end
@@ -118,4 +118,4 @@ end
-- Mark ourselves loaded.
-_LOADED["delib"]=true
+package.loaded["delib"]=true
|