aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-09-17 12:53:40 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-09-17 12:53:40 -0400
commitc44b084d2c15bf73a610c371998a8c791d298a0f (patch)
treeb74c4b573f0e5086a45fe7c06bf4b4bf90f7b5b9
parentc19cb9243d4e2ee4dfdb425d323922aacb8c603e (diff)
downloadtextadept-c44b084d2c15bf73a610c371998a8c791d298a0f.tar.gz
textadept-c44b084d2c15bf73a610c371998a8c791d298a0f.zip
More LuaDoc updates.
-rw-r--r--core/.buffer.luadoc16
-rw-r--r--core/.ui.dialogs.luadoc45
-rw-r--r--core/init.lua6
-rw-r--r--modules/textadept/run.lua10
4 files changed, 40 insertions, 37 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 2fd1a409..29b15341 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -151,9 +151,7 @@
-- @field call_tip_fore_hlt (number, Write-only)
-- A call tip's highlighted text foreground color, in "0xBBGGRR" format.
-- @field call_tip_pos_start (number, Write-only)
--- The position to display a call tip at with [`buffer.call_tip_show()`]().
--- When a call tip is visible, this is the position where backspacing beyond
--- it hides the call tip.
+-- The position in which backspacing beyond it hides a visible call tip.
-- @field call_tip_position (boolean)
-- Display a call tip above the current line instead of below it.
-- The default value is `false`.
@@ -539,8 +537,8 @@
-- `DWELL_START` event. A time of `buffer.TIME_FOREVER` will never generate
-- one.
-- @field mouse_selection_rectangular_switch (bool)
--- Whether or not pressing [`buffer.rectangular_selection_modifier`]() during
--- normal text selection with the mouse turns on rectangular selection.
+-- Whether or not pressing [`buffer.rectangular_selection_modifier`]() when
+-- selecting text normally with the mouse turns on rectangular selection.
-- The default value is `false`.
-- @field modify (bool)
-- Whether or not the buffer has unsaved changes.
@@ -885,11 +883,11 @@
-- * `buffer.WRAP_NONE`
-- Long lines are not wrapped.
-- * `buffer.WRAP_WORD`
--- Wrap long lines at word and style boundaries.
+-- Wrap long lines at word (and style) boundaries.
-- * `buffer.WRAP_CHAR`
-- Wrap long lines at character boundaries.
-- * `buffer.WRAP_WHITESPACE`
--- Wrap long lines at word boundaries, ignoring style boundaries.
+-- Wrap long lines at word boundaries (ignoring style boundaries).
--
-- The default value is `buffer.WRAP_NONE`.
-- @field wrap_start_indent (number)
@@ -2406,8 +2404,8 @@ function position_before(buffer, pos) end
function position_from_line(buffer, line) end
---
--- Returns the position *n* characters before or after position *pos*, taking
--- multi-byte characters into account.
+-- Returns the position *n* characters before or after position *pos* (taking
+-- multi-byte characters into account).
-- Returns `0` if the position is less than 0 or `buffer.length` if the position
-- is greater than `buffer.length`.
-- @param buffer A buffer.
diff --git a/core/.ui.dialogs.luadoc b/core/.ui.dialogs.luadoc
index 958ff55e..523c423b 100644
--- a/core/.ui.dialogs.luadoc
+++ b/core/.ui.dialogs.luadoc
@@ -104,14 +104,15 @@ function ok_msgbox(options) end
function yesno_msgbox(options) end
---
--- Prompts the user with a one-line input-box dialog defined by dialog options
--- table *options*, returning the selected button's index along with the user's
--- input text.
+-- Prompts the user with an inputbox dialog defined by dialog options table
+-- *options*, returning the selected button's index along with the user's
+-- input text (the latter as a string or table, depending on the type of
+-- *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -141,14 +142,15 @@ function yesno_msgbox(options) end
function inputbox(options) end
---
--- Prompts the user with a one-line input-box dialog defined by dialog options
--- table *options* and with localized "Ok" and "Cancel" buttons, returning the
--- selected button's index along with the user's input text.
+-- Prompts the user with an inputbox dialog defined by dialog options table
+-- *options* and with localized "Ok" and "Cancel" buttons, returning the
+-- selected button's index along with the user's input text (the latter as a
+-- string or table, depending on the type of *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -173,14 +175,15 @@ function inputbox(options) end
function standard_inputbox(options) end
---
--- Prompts the user with a one-line masked input-box dialog defined by dialog
--- options table *options*, returning the selected button's index along with the
--- user's input text.
+-- Prompts the user with a masked inputbox dialog defined by dialog options
+-- table *options*, returning the selected button's index along with the user's
+-- input text (the latter as a string or table, depending on the type of
+-- *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -208,14 +211,15 @@ function standard_inputbox(options) end
function secure_inputbox(options) end
---
--- Prompts the user with a one-line masked input-box dialog defined by dialog
--- options table *options* and with localized "Ok" and "Cancel" buttons,
--- returning the selected button's index along with the user's input text.
+-- Prompts the user with a masked inputbox dialog defined by dialog options
+-- table *options* and with localized "Ok" and "Cancel" buttons, returning the
+-- selected button's index along with the user's input text (the latter as a
+-- string or table, depending on the type of *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -440,8 +444,9 @@ function filteredlist(options) end
---
-- Prompts the user with an option selection dialog defined by dialog options
-- table *options*, returning the selected button's index along with the indices
--- of the selected options or, if *options*.`string_output` is `true`, the
--- selected button's label along with the text of the selected options.
+-- of the selected options.
+-- If *options*.`string_output` is `true`, returns the selected button's label
+-- along with the text of the selected options.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
-- @param options Table of key-value option pairs for the option select dialog.
@@ -456,8 +461,8 @@ function filteredlist(options) end
-- to be set.
-- * `select`: The indices of initially selected options.
-- * `string_output`: Return the selected button's label or the dialog's exit
--- status along with the selected option's text instead of the button's
--- index or the dialog's exit code along with the option's index. The
+-- status along with the selected options' text instead of the button's
+-- index or the dialog's exit code along with the options' indices. The
-- default value is `false`.
-- * `width`: The dialog's pixel width.
-- * `height`: The dialog's pixel height.
diff --git a/core/init.lua b/core/init.lua
index 50289ce0..223aee4b 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -18,9 +18,9 @@ _M = {} -- language modules table
if jit then module, package.searchers, bit32 = nil, package.loaders, bit end
-- pdcurses compatibility.
if CURSES and WIN32 then
- function spawn(argv, working_dir, stdout_cb, stderr_cb, exit_cb)
+ function spawn(argv, cwd, stdout_cb, stderr_cb, exit_cb)
local current_dir = lfs.currentdir()
- if working_dir then lfs.chdir(working_dir) end
+ if cwd then lfs.chdir(cwd) end
local p = io.popen(argv..' 2>&1')
if stdout_cb then stdout_cb(p:read('*a')) end
if exit_cb then exit_cb(select(3, p:close())) else p:close() end
@@ -144,7 +144,7 @@ local timeout
-- thread.
-- @param argv A command line string containing the program's name followed by
-- arguments to pass to it. `PATH` is searched for program names.
--- @param working_dir Optional current working directory (cwd) for the child
+-- @param cwd Optional current working directory (cwd) for the child
-- process. The default value is `nil`, which inherits the parent's cwd.
-- @param stdout_cb Optional Lua function that accepts a string parameter for a
-- block of standard output read from the child. Stdout is read asynchronously
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index b756f76e..2baa470c 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -17,7 +17,6 @@ local M = {}
-- It is used for going to error messages with relative file paths.
-- @field proc (process)
-- The currently running process or the most recent process run.
--- This field does not exist in the terminal version.
-- @field _G.events.COMPILE_OUTPUT (string)
-- Emitted when executing a language's compile shell command.
-- By default, compiler output is printed to the message buffer. To override
@@ -173,7 +172,7 @@ end
M.compile_commands = {actionscript='mxmlc "%f"',ada='gnatmake "%f"',ansi_c='gcc -o "%e" "%f"',antlr='antlr4 "%f"',g='antlr3 "%f"',applescript='osacompile "%f" -o "%e.scpt"',asm='nasm "%f" && ld "%e.o" -o "%e"',boo='booc "%f"',caml='ocamlc -o "%e" "%f"',csharp=WIN32 and 'csc "%f"' or 'mcs "%f"',cpp='g++ -o "%e" "%f"',coffeescript='coffee -c "%f"',context='context --nonstopmode "%f"',cuda=WIN32 and 'nvcc -o "%e.exe" "%f"' or 'nvcc -o "%e" "%f"',dmd='dmd "%f"',dot='dot -Tps "%f" -o "%e.ps"',eiffel='se c "%f"',erlang='erl -compile "%e"',fsharp=WIN32 and 'fsc.exe "%f"' or 'mono fsc.exe "%f"',fortran='gfortran -o "%e" "%f"',gap='gac -o "%e" "%f"',go='go build "%f"',groovy='groovyc "%f"',haskell=WIN32 and 'ghc -o "%e.exe" "%f"' or 'ghc -o "%e" "%f"',inform=function() return 'inform -c "'..buffer.filename:match('^(.+%.inform[/\\])Source')..'"' end,java='javac "%f"',ltx='pdflatex -file-line-error -halt-on-error "%f"',less='lessc "%f" "%e.css"',lilypond='lilypond "%f"',lisp='clisp -c "%f"',litcoffee='coffee -c "%f"',lua='luac -o "%e.luac" "%f"',markdown='markdown "%f" > "%e.html"',nemerle='ncc "%f" -out:"%e.exe"',nimrod='nimrod c "%f"',nsis='MakeNSIS "%f"',objective_c='gcc -o "%e" "%f"',pascal='fpc "%f"',perl='perl -c "%f"',php='php -l "%f"',prolog='gplc --no-top-level "%f"',python='python -m py_compile "%f"',ruby='ruby -c "%f"',sass='sass "%f" "%e.css"',scala='scalac "%f"',tex='pdflatex -file-line-error -halt-on-error "%f"',vala='valac "%f"',vb=WIN32 and 'vbc "%f"' or 'vbnc "%f"',}
---
--- Compiles the current file based on its extension or language, using the
+-- Compiles the current file based on its extension or language using the
-- shell command from the `compile_commands` table.
-- Emits `COMPILE_OUTPUT` events.
-- @see compile_commands
@@ -196,7 +195,7 @@ events.connect(events.COMPILE_OUTPUT, print_output)
M.run_commands = {actionscript=WIN32 and 'start "" "%e.swf"' or OSX and 'open "file://%e.swf"' or 'xdg-open "%e.swf"',ada=WIN32 and '"%e"' or './"%e"',ansi_c=WIN32 and '"%e"' or './"%e"',applescript='osascript "%f"',asm='./"%e"',awk='awk -f "%f"',batch='"%f"',boo='booi "%f"',caml='ocamlrun "%e"',csharp=WIN32 and '"%e"' or 'mono "%e.exe"',cpp=WIN32 and '"%e"' or './"%e"',chuck='chuck "%f"',cmake='cmake -P "%f"',coffeescript='coffee "%f"',context=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',cuda=WIN32 and '"%e"' or './"%e"',dmd=WIN32 and '"%e"' or './"%e"',eiffel="./a.out",fsharp=WIN32 and '"%e"' or 'mono "%e.exe"',forth='gforth "%f" -e bye',fortran=WIN32 and '"%e"' or './"%e"',gnuplot='gnuplot "%f"',go='go run "%f"',groovy='groovy "%f"',haskell=WIN32 and '"%e"' or './"%e"',html=WIN32 and 'start "" "%f"' or OSX and 'open "file://%f"' or 'xdg-open "%f"',idl='idl -batch "%f"',Io='io "%f"',java='java "%e"',javascript='node "%f"',ltx=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',less='lessc --no-color "%f"',lilypond=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',lisp='clisp "%f"',litcoffee='coffee "%f"',lua='lua -e "io.stdout:setvbuf(\'no\')" "%f"',makefile=WIN32 and 'nmake -f "%f"' or 'make -f "%f"',markdown='markdown "%f"',nemerle=WIN32 and '"%e"' or 'mono "%e.exe"',nimrod=WIN32 and '"%e"' or './"%e"',objective_c=WIN32 and '"%e"' or './"%e"',pascal=WIN32 and '"%e"' or './"%e"',perl='perl "%f"',php='php "%f"',pike='pike "%f"',pkgbuild='makepkg -p "%f"',prolog=WIN32 and '"%e"' or './"%e"',python='python -u "%f"',rstats=WIN32 and 'Rterm -f "%f"' or 'R -f "%f"',rebol='REBOL "%f"',rexx=WIN32 and 'rexx "%e"' or 'regina "%e"',ruby='ruby "%f"',sass='sass "%f"',scala='scala "%e"',bash='bash "%f"',csh='tcsh "%f"',sh='sh "%f"',zsh='zsh "%f"',smalltalk='gst "%f"',tcl='tclsh "%f"',tex=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',vala=WIN32 and '"%e"' or './"%e"',vb=WIN32 and '"%e"' or 'mono "%e.exe"',}
---
--- Runs the current file based on its extension or language, using the shell
+-- Runs the current file based on its extension or language using the shell
-- command from the `run_commands` table.
-- Emits `RUN_OUTPUT` events.
-- @see run_commands
@@ -213,11 +212,12 @@ events.connect(events.RUN_OUTPUT, print_output)
M.build_commands = {--[[Ant]]['build.xml']='ant',--[[Make]]Makefile='make',GNUmakefile='make',makefile='make',--[[Maven]]['pom.xml']='mvn',--[[Ruby]]Rakefile='rake'}
---
--- Builds the current project based on the buffer's filename or the current
--- working directory.
+-- Builds the current project (based on the buffer's filename or the current
+-- working directory) using the shell command from the `build_commands` table.
-- If a "makefile" type of build file is found, prompts the user for the full
-- build command.
-- Emits `BUILD_OUTPUT` events.
+-- @see build_commands
-- @see _G.events
-- @name build
function M.build() command(M.build_commands, events.BUILD_OUTPUT) end