aboutsummaryrefslogtreecommitdiff
path: root/modules/cpp
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-04-09 18:48:30 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-04-09 18:48:30 -0400
commitf5c492e1f1de148af95accb85e958c3ccdffca5c (patch)
treee9f89f61dca1a88d186e5c4cebc5abed8852ca42 /modules/cpp
parentd11a4020e4a197cff0da67cb0d2dd6bfb79ee11e (diff)
downloadtextadept-f5c492e1f1de148af95accb85e958c3ccdffca5c.tar.gz
textadept-f5c492e1f1de148af95accb85e958c3ccdffca5c.zip
Moved _m.textadept.run module commands to language-specific modules.
Diffstat (limited to 'modules/cpp')
-rw-r--r--modules/cpp/commands.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/cpp/commands.lua b/modules/cpp/commands.lua
index 07ce0cac..f01561c4 100644
--- a/modules/cpp/commands.lua
+++ b/modules/cpp/commands.lua
@@ -6,6 +6,18 @@ local textadept = _G.textadept
-- Commands for the cpp module.
module('_m.cpp.commands', package.seeall)
+local run = _m.textadept.run
+if run then
+ run.compile_command.c = 'gcc -pedantic -Os -o "%(filename_noext)" %(filename)'
+ run.compile_command.cpp = 'g++ -pedantic -Os -o "%(filename_noext)" %(filename)'
+ run.run_command.c = '%(filedir)%(filename_noext)'
+ run.run_command.cpp = '%(filedir)%(filename_noext)'
+ run.error_detail.c = {
+ pattern = '^(.-):(%d+): (.+)$',
+ filename = 1, line = 2, message = 3
+ }
+end
+
-- C++-specific key commands.
local keys = _G.keys
if type(keys) == 'table' then