From ab2806f57d24d2cba3ab7657ed311fb7b6d1b6a2 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 16 Jul 2012 20:54:49 -0400 Subject: Code cleanup. --- core/gui.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/gui.lua') diff --git a/core/gui.lua b/core/gui.lua index cb9aa1d9..ca25402e 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -147,6 +147,7 @@ function gui.goto_file(filename, split, preferred_view, sloppy) io.open_file(filename) end +local theme_file = not NCURSES and 'theme' or 'theme_term' local THEME --- -- Sets the editor theme from the given name. @@ -162,7 +163,6 @@ function gui.set_theme(name) if not name then -- Read theme from ~/.textadept/theme or ~/.textadept/theme_term depending -- on NCURSES platform, defaulting to 'light' or 'term' respectively. - local theme_file = not NCURSES and 'theme' or 'theme_term' local f = io.open(_USERHOME..'/'..theme_file, 'rb') if f then name = f:read('*line'):match('[^\r\n]+') @@ -228,7 +228,6 @@ function gui.select_theme() if not theme then return end gui.set_theme(theme) -- Write the theme to the user's theme file. - local theme_file = not NCURSES and 'theme' or 'theme_term' local f = io.open(_USERHOME..'/'..theme_file, 'wb') if not f then return end f:write(theme) -- cgit v1.2.3