diff options
author | 2013-04-30 14:38:29 -0400 | |
---|---|---|
committer | 2013-04-30 14:38:29 -0400 | |
commit | 2b0dfd1cdb9002c1b248e95648161d939b5bc727 (patch) | |
tree | fa940ff08decddc1f869bdf3375bde567cb8c3a0 /modules/textadept/run.lua | |
parent | d8c9d1f54c22a4fc00e607a61485ef9349b91fb5 (diff) | |
download | textadept-2b0dfd1cdb9002c1b248e95648161d939b5bc727.tar.gz textadept-2b0dfd1cdb9002c1b248e95648161d939b5bc727.zip |
More code cleanup.
Diffstat (limited to 'modules/textadept/run.lua')
-rw-r--r-- | modules/textadept/run.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 91c8a522..18577448 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -38,7 +38,6 @@ module('_M.textadept.run')]] M.MARK_ERROR_BACK = not CURSES and 0x8080CC or 0x0000FF -- Events. -local events, events_connect, events_emit = events, events.connect, events.emit events.COMPILE_OUTPUT, events.RUN_OUTPUT = 'compile_output', 'run_output' local preferred_view @@ -71,6 +70,7 @@ local function command(cmd_table, compiling) local current_dir = lfs.currentdir() lfs.chdir(filedir) local event = compiling and events.COMPILE_OUTPUT or events.RUN_OUTPUT + local events_emit = events.emit local lexer = buffer:get_lexer() events_emit(event, lexer, '> '..command:iconv('UTF-8', _CHARSET)) local p = io.popen(command..' 2>&1') @@ -138,7 +138,7 @@ M.compile_command = {} -- @see _G.events -- @name compile function M.compile() command(M.compile_command, true) end -events_connect(events.COMPILE_OUTPUT, print_output) +events.connect(events.COMPILE_OUTPUT, print_output) --- -- Map of file extensions (excluding the leading '.') to their associated @@ -165,7 +165,7 @@ M.run_command = {} -- @see _G.events -- @name run function M.run() command(M.run_command) end -events_connect(events.RUN_OUTPUT, print_output) +events.connect(events.RUN_OUTPUT, print_output) --- -- Map of lexer names to their error string details, tables containing the @@ -240,7 +240,7 @@ function M.goto_error(line, next) buffer.annotation_style[line - 1] = 8 -- error end end -events_connect(events.DOUBLE_CLICK, function(pos, line) M.goto_error(line) end) +events.connect(events.DOUBLE_CLICK, function(pos, line) M.goto_error(line) end) local CURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ') -- Sets view properties for error markers. @@ -249,6 +249,6 @@ local function set_error_properties() buffer.marker_back[MARK_ERROR] = M.MARK_ERROR_BACK end if buffer then set_error_properties() end -events_connect(events.VIEW_NEW, set_error_properties) +events.connect(events.VIEW_NEW, set_error_properties) return M |