diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/.proc.luadoc | 29 | ||||
-rw-r--r-- | core/file_io.lua | 45 | ||||
-rw-r--r-- | core/init.lua | 29 | ||||
-rw-r--r-- | core/locale.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.de.conf | 5 | ||||
-rw-r--r-- | core/locales/locale.es.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.fr.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.ru.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.sv.conf | 37 |
9 files changed, 94 insertions, 63 deletions
diff --git a/core/.proc.luadoc b/core/.proc.luadoc new file mode 100644 index 00000000..ae62bdf8 --- /dev/null +++ b/core/.proc.luadoc @@ -0,0 +1,29 @@ +-- Copyright 2012-2014 Mitchell mitchell.att.foicica.com. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for functions in the proc +-- userdata defined by the lspawn module. + +--- +-- Userdata representing a process created by `spawn()`. +module('proc') + +--- +-- Returns the status of `proc`, which is either "running" or "terminated". +-- @param proc A process created by `spawn()`. +-- @return "running" or "terminated" +function status(proc) end + +--- +-- Blocks until `proc` finishes. +-- @param proc A process created by `spawn()`. +function wait(proc) end + +--- +-- Writes string `input` to the stdin of `proc`. +-- @param proc A process created by `spawn()`. +-- @param ... Standard input for `proc`. +function write(proc, ...) end + +--- +-- Kills running `proc`. +-- @param proc A running process created by `spawn()`. +function kill(proc) end diff --git a/core/file_io.lua b/core/file_io.lua index 35ca5c03..a313cc66 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -418,48 +418,3 @@ function io.snapopen(paths, filter, exclude_FILTER, opts) for i = 1, #files do files[i] = files[i]:iconv(_CHARSET, 'UTF-8') end io.open_file(files) end - --- On Windows, override `io.popen` and `os.execute` to use winapi to prevent the --- flashing black box. -if WIN32 then - local winapi = require('winapi') - io.popen = function(prog) - local p, f = winapi.spawn_process(os.getenv('COMSPEC')..' /c '..prog) - if not p then return nil, f end - local file - file = { - read = function(self, format) - if not format or not format:find('^%*a') then return f:read() end - local chunk, text = f:read(), {} - while chunk do - text[#text + 1] = chunk - chunk = f:read() - end - return table.concat(text, '') - end, - write = function(self, ...) f:write(...) end, - flush = function() end, - lines = function() - local output, pos = file:read('*a'), 1 - if not output:find('\r?\n$') then output = output..'\n' end - return function() - local s, e, line = output:find('([^\r\n]*)\r?\n', pos) - if not s then return nil end - pos = e + 1 - return line - end - end, - close = function() - local _, status = p:wait(100) - if status == 'TIMEOUT' then p:kill() end - return true, 'exit', p:get_exit_code() - end - } - return file - end - os.execute = function(prog) - if not prog then return true end -- shell is available - local code = winapi.execute(prog) - return code == 0 and true or nil, 'exit', code - end -end diff --git a/core/init.lua b/core/init.lua index 6470f689..df4a5e38 100644 --- a/core/init.lua +++ b/core/init.lua @@ -122,4 +122,33 @@ local reset -- @class function -- @name timeout local timeout + +-- The function below comes from the lspawn module. + +--- +-- Spawns an interactive child process *argv* in a separate thread with the help +-- of GLib. +-- @param argv A UTF-8-encoded command line string containing the program's name +-- followed by arguments to pass to it. `PATH` is searched for program names. +-- @param working_dir The child's UTF-8 current working directory (cwd) or `nil` +-- to inherit the parent's. +-- @param stdout_cb A Lua function that accepts a string parameter for a block +-- of standard output read from the child. Stdout is read asynchronously in +-- 1KB or 0.5KB blocks (depending on the platform), or however much data is +-- available at the time. All text is encoded in `_CHARSET`. +-- @param stderr_cb A Lua function that accepts a string parameter for a block +-- of standard error read from the child. Stderr is read asynchronously in 1KB +-- or 0.5kB blocks (depending on the platform), or however much data is +-- available at the time. All text is encoded in `_CHARSET`. +-- @param exit_cb A Lua function that is called when the child process finishes. +-- The child's exit status is passed. +-- @return proc +-- @usage spawn('lua buffer.filename', nil, print) +-- @usage proc = spawn('lua -e "print(io.read())", nil, print) +-- proc:write('foo\\n') +-- @see _G._CHARSET +-- @see _G.proc +-- @class function +-- @name spawn +local spawn ]] diff --git a/core/locale.conf b/core/locale.conf index ed2b8d1c..37b784dd 100644 --- a/core/locale.conf +++ b/core/locale.conf @@ -177,6 +177,8 @@ Command _Entry = Command _Entry Select Co_mmand = Select Co_mmand _Run = _Run _Compile = _Compile +Buil_d = Buil_d +S_top = S_top _Next Error = _Next Error _Previous Error = _Previous Error _Adeptsense = _Adeptsense @@ -192,6 +194,7 @@ Snap_open = Snap_open Snapopen _User Home = Snapopen _User Home Snapopen _Textadept Home = Snapopen _Textadept Home Snapopen _Current Directory = Snapopen _Current Directory +Snapopen Current _Project = Snapopen Current _Project _Snippets = _Snippets _Insert Snippet... = _Insert Snippet... _Expand Snippet/Next Placeholder = _Expand Snippet/Next Placeholder diff --git a/core/locales/locale.de.conf b/core/locales/locale.de.conf index 40a3b746..6e2da778 100644 --- a/core/locales/locale.de.conf +++ b/core/locales/locale.de.conf @@ -167,8 +167,10 @@ Command _Entry = Befehlseingabe Select Co_mmand = Befehl auswählen _Run = Ausführen _Compile = Kompilieren +Buil_d = Build starten +S_top = Stoppen _Next Error = Nächstes Fehler -_Previous Error = Voriges Fehler +_Previous Error = Voriger Fehler _Adeptsense = _Adeptsense _Complete Symbol = Symbol vervollständigen Show _Documentation = Dokumentation anzeigen @@ -182,6 +184,7 @@ Snap_open = Snap_open Snapopen _User Home = Snapopen _Userhome-Verzeichnis Snapopen _Textadept Home = Snapopen _Textadept-Verzeichnis Snapopen _Current Directory = Snapopen aktuelles Verzeichnis +Snapopen Current _Project = Snapopen aktuelles Projekt _Snippets = _Snippets _Insert Snippet... = Snippet auswählen... _Expand Snippet/Next Placeholder = _Snippet einfügen/Nächster Platzhalter diff --git a/core/locales/locale.es.conf b/core/locales/locale.es.conf index 69da3223..6188c8f3 100644 --- a/core/locales/locale.es.conf +++ b/core/locales/locale.es.conf @@ -178,6 +178,8 @@ Command _Entry = _Línea de comandos Select Co_mmand = _Seleccionar comandos _Run = _Ejecutar _Compile = _Compilar +Buil_d = Co_nstruir +S_top = _Detener _Next Error = Error sig_uiente _Previous Error = Error _anterior _Adeptsense = _Adeptsense @@ -193,6 +195,7 @@ Snap_open = Snap_open Snapopen _User Home = Snapopen en carpeta de _usuario Snapopen _Textadept Home = Snapopen en carpeta de _Textadept Snapopen _Current Directory = Snapopen en carpeta _actual +Snapopen Current _Project = _Snippets = _Fragmentos de código _Insert Snippet... = _Insertar fragmento... _Expand Snippet/Next Placeholder = _Expandir fragmento/siguiente marcador diff --git a/core/locales/locale.fr.conf b/core/locales/locale.fr.conf index 5aa43d63..02d778d9 100644 --- a/core/locales/locale.fr.conf +++ b/core/locales/locale.fr.conf @@ -178,6 +178,8 @@ Command _Entry = Ligne de _commande Select Co_mmand = Sélectionner co_mmande _Run = _Lancer _Compile = _Compiler +Buil_d = C_onstruire +S_top = _Arrêter _Next Error = Erreur _suivant _Previous Error = Erreur _précédent _Adeptsense = _Adeptsense @@ -193,6 +195,7 @@ Snap_open = Snap_open Snapopen _User Home = Snapopen dossier _utilisateur Snapopen _Textadept Home = Snapopen dossier _Textadept Snapopen _Current Directory = Snapopen dossier _courant +Snapopen Current _Project = Snapopen _projet courant _Snippets = S_nippets _Insert Snippet... = _Insérer snippet... _Expand Snippet/Next Placeholder = _Étendre snippet/Marque snippet suivante diff --git a/core/locales/locale.ru.conf b/core/locales/locale.ru.conf index dcef6186..7fa0046d 100644 --- a/core/locales/locale.ru.conf +++ b/core/locales/locale.ru.conf @@ -167,6 +167,8 @@ Command _Entry = Командная _строка Select Co_mmand = Выбрать _команду _Run = _Запустить _Compile = _Скомпилировать +Buil_d = С_обрать +S_top = Ос_тановить _Next Error = Следующая Ошибка _Previous Error = Предыдущая Ошибка _Adeptsense = _Adeptsense @@ -182,6 +184,7 @@ Snap_open = _Быстрое открытие файлов Snapopen _User Home = Быстрое открытие _домашнего каталога Snapopen _Textadept Home = Быстрое открытие домашней страницы _Textadept Snapopen _Current Directory = Быстрое открытие _текущего каталога +Snapopen Current _Project = Быстрое открытие текущего _проект _Snippets = _Заготовки _Insert Snippet... = _Вставить загтовку... _Expand Snippet/Next Placeholder = _Развернуть заготовку/Следующая метка diff --git a/core/locales/locale.sv.conf b/core/locales/locale.sv.conf index 11f04c70..e0ca67c6 100644 --- a/core/locales/locale.sv.conf +++ b/core/locales/locale.sv.conf @@ -20,7 +20,7 @@ Undefined event name = Odefinierat event-namn % core/file_io.lua Open = Öppna -Encoding conversion failed. = Kunde inte omvandla teckenkodningen. +Encoding conversion failed. = Kunde inte konvertera teckenkodningen. Cannot change binary file encoding = Kan inte ändra binär filkodning Save = Spara Untitled = Namnlös @@ -104,16 +104,16 @@ Files(F4) = Files(F4) % modules/textadept/keys.lua Lexer = Lexer Style = Stil -Error loading webpage: = Kunde inte ladda webbsida: +Error loading webpage: = Kunde inte läsa in webbsida: % modules/textadept/menu.lua _File = _Arkiv _New = _Nytt -_Open = _Öppna +_Open = _Öppna... Open _Recent... = Öppna s_enaste... Re_load = Ladda _om _Save = _Spara -Save _As = Spara so_m +Save _As = Spara so_m... Save All = Spara a_lla _Close = S_täng Close All = St_äng alla @@ -175,10 +175,12 @@ Goto Nex_t File Found = Gå till näs_ta funna fil Goto Previou_s File Found = Gå till f_öregående funna fil _Jump to = _Gå till rad... _Tools = _Verktyg -Command _Entry = _Kommandorad -Select Co_mmand = _Välj kommando +Command _Entry = _Kommandorad... +Select Co_mmand = _Välj kommando... _Run = K_ör _Compile = Ko_mpilera +Buil_d = B_ygg +S_top = Avbry_t _Next Error = _Nästa fel _Previous Error = _Föregående fel _Adeptsense = _Adeptsense @@ -190,15 +192,16 @@ _Clear Bookmarks = _Rensa bokmärken _Next Bookmark = _Nästa bokmärke _Previous Bookmark = _Föregående bokmärke _Goto Bookmark... = _Gå till bokmärke... -Snap_open = Snap_open -Snapopen _User Home = Snapopen _användarkonfiguration -Snapopen _Textadept Home = Snapopen _systemkonfiguration -Snapopen _Current Directory = Snapopen _nuvarande katalog -_Snippets = Sni_ppets -_Insert Snippet... = _Infoga snippet... -_Expand Snippet/Next Placeholder = _Expandera snippet/Nästa fält -_Previous Snippet Placeholder = _Föregående snippetfält -_Cancel Snippet = _Avbryt snippet +Snap_open = Snabb_öppna +Snapopen _User Home = Snabböppna _användarkonfiguration... +Snapopen _Textadept Home = Snabböppna _systemkonfiguration... +Snapopen _Current Directory = Snabböppna _nuvarande katalog... +Snapopen Current _Project = Snabböppna nuvarande _projekt... +_Snippets = Kodsn_uttar +_Insert Snippet... = _Infoga kodsnutt... +_Expand Snippet/Next Placeholder = Expandera kodsnutt/_Nästa fält +_Previous Snippet Placeholder = _Föregående fält +_Cancel Snippet = _Avbryt kodsnutt Show St_yle = Visa _stil _Buffer = _Buffert _Next Buffer = _Nästa buffert @@ -221,7 +224,7 @@ _ASCII Encoding = _ASCII _ISO-8859-1 Encoding = _ISO-8859-1 _MacRoman Encoding = _MacRoman UTF-1_6 Encoding = UTF-1_6 -Select _Lexer... = Välj _lexer... +Select _Lexer... = Välj språk (_lexer)... _Refresh Syntax Highlighting = _Uppdatera syntaxfärgning _View = V_y _Next View = _Nästa vy @@ -232,7 +235,7 @@ _Unsplit View = Slå _ihop vy Unsplit _All Views = _Endast en vy _Grow View = För_stora vy Shrin_k View = För_miska vy -Toggle Current _Fold = Växla nuvarande inf_ällning +Toggle Current _Fold = F_äll ihop/upp nuvarande sektion Toggle View _EOL = Växla _radslutstecken Toggle _Wrap Mode = Växla rad_brytning Toggle Show In_dent Guides = Växla in_dragshjälplinjer |