aboutsummaryrefslogtreecommitdiff
path: root/core/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-04-05 15:32:33 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-04-05 15:32:33 -0400
commitc9780bff7285d4bf756c689229add52b4701570b (patch)
tree8d491e3eb516fde0b5dac4786003016504d13404 /core/init.lua
parente20531bcb0cdd582c82a5083f917fb1b94557087 (diff)
downloadtextadept-c9780bff7285d4bf756c689229add52b4701570b.tar.gz
textadept-c9780bff7285d4bf756c689229add52b4701570b.zip
Code cleanup.
Diffstat (limited to 'core/init.lua')
-rw-r--r--core/init.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/init.lua b/core/init.lua
index f17ec196..25708169 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -15,16 +15,14 @@ _LEXERPATH = _USERHOME..'/lexers/?.lua;'.._HOME..'/lexers'
_THEME = 'light'
local f = io.open(_USERHOME..'/theme', 'rb')
if f then
- theme = f:read('*line'):match('[^\r\n]+')
+ local theme = f:read('*line'):match('[^\r\n]+')
f:close()
if theme and #theme > 0 then _THEME = theme end
end
-theme = _THEME
-if not theme:find('[/\\]') then
+if not _THEME:find('[/\\]') then
+ local theme = _THEME
_THEME = _HOME..'/themes/'..theme
- if not lfs.attributes(_THEME) then
- _THEME = _USERHOME..'/themes/'..theme
- end
+ if not lfs.attributes(_THEME) then _THEME = _USERHOME..'/themes/'..theme end
end
require 'iface'