aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-01-10 17:31:21 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-01-10 17:31:21 -0500
commitac698c5ea71d26e56289a18e664c6f8be1aa56c5 (patch)
treee683366e29ff29e8c0ebff54731ff505c201a6ff /themes
parent0194a626fcb17bcb037341fc6c2f586f54d26035 (diff)
Various improvements to speed and readability of Lua code.
Added 'local textadept = _G.textadept' to all Lua modules, themes, etc. Added more locals to core/ext/keys.lua for speed improvement. Reformatted some Lua modules to the earlier standard committed.
Diffstat (limited to 'themes')
-rw-r--r--themes/dark/buffer.lua3
-rw-r--r--themes/dark/view.lua4
-rw-r--r--themes/light/buffer.lua3
-rw-r--r--themes/light/view.lua4
-rw-r--r--themes/scite/buffer.lua41
-rw-r--r--themes/scite/view.lua4
6 files changed, 34 insertions, 25 deletions
diff --git a/themes/dark/buffer.lua b/themes/dark/buffer.lua
index bf9862fe..db045766 100644
--- a/themes/dark/buffer.lua
+++ b/themes/dark/buffer.lua
@@ -1,7 +1,8 @@
-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- Dark editor theme for Textadept.
-local textadept, buffer = textadept, buffer
+local textadept = _G.textadept
+local buffer = buffer
-- folding
buffer.property['fold'] = '1'
diff --git a/themes/dark/view.lua b/themes/dark/view.lua
index 0a576637..63fd79d0 100644
--- a/themes/dark/view.lua
+++ b/themes/dark/view.lua
@@ -1,7 +1,9 @@
-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- Dark editor theme for Textadept.
-local c, buffer = textadept.constants, buffer
+local textadept = _G.textadept
+local c = textadept.constants
+local buffer = buffer
-- caret
buffer.caret_fore = 11184810 -- 0xAA | 0xAA << 8 | 0xAA << 16
diff --git a/themes/light/buffer.lua b/themes/light/buffer.lua
index 9d62eb38..f31d8d3d 100644
--- a/themes/light/buffer.lua
+++ b/themes/light/buffer.lua
@@ -1,7 +1,8 @@
-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- Light editor theme for Textadept.
-local textadept, buffer = textadept, buffer
+local textadept = _G.textadept
+local buffer = buffer
-- folding
buffer.property['fold'] = '1'
diff --git a/themes/light/view.lua b/themes/light/view.lua
index 3065fc67..99ce21e6 100644
--- a/themes/light/view.lua
+++ b/themes/light/view.lua
@@ -1,7 +1,9 @@
-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- Light editor theme for Textadept.
-local c, buffer = textadept.constants, buffer
+local textadept = _G.textadept
+local c = textadept.constants
+local buffer = buffer
-- caret
buffer.caret_fore = 3355443 -- 0x33 | 0x33 << 8 | 0x33 << 16
diff --git a/themes/scite/buffer.lua b/themes/scite/buffer.lua
index 0b70c606..aa5555f5 100644
--- a/themes/scite/buffer.lua
+++ b/themes/scite/buffer.lua
@@ -1,20 +1,21 @@
--- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
--- SciTE editor theme for Textadept.
-
-local textadept, buffer = textadept, buffer
-
--- folding
-buffer.property['fold'] = '1'
-buffer.property['fold.by.indentation'] = '1'
-
--- tabs and indentation
-buffer.tab_width = 2
-buffer.use_tabs = false
-buffer.indent = 2
-buffer.tab_indents = true
-buffer.back_space_un_indents = true
-buffer.indentation_guides = 1
-
--- various
-buffer.eol_mode = textadept.constants.SC_EOL_LF
-buffer.auto_c_choose_single = true
+-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
+-- SciTE editor theme for Textadept.
+
+local textadept = _G.textadept
+local buffer = buffer
+
+-- folding
+buffer.property['fold'] = '1'
+buffer.property['fold.by.indentation'] = '1'
+
+-- tabs and indentation
+buffer.tab_width = 2
+buffer.use_tabs = false
+buffer.indent = 2
+buffer.tab_indents = true
+buffer.back_space_un_indents = true
+buffer.indentation_guides = 1
+
+-- various
+buffer.eol_mode = textadept.constants.SC_EOL_LF
+buffer.auto_c_choose_single = true
diff --git a/themes/scite/view.lua b/themes/scite/view.lua
index ff068f39..86e1c95f 100644
--- a/themes/scite/view.lua
+++ b/themes/scite/view.lua
@@ -1,7 +1,9 @@
-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- SciTE editor theme for Textadept.
-local buffer, c = buffer, textadept.constants
+local textadept = _G.textadept
+local c = textadept.constants
+local buffer = buffer
buffer.margin_width_n[0] = 4 * buffer:text_width(c.STYLE_LINENUMBER, "9")