aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-10-21 16:12:30 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-10-21 16:12:30 -0400
commit2cccb55923ef95aa657ba69f12d84610a811aa6d (patch)
tree1e4af695d94173ace76a91ccdd35f74c77dd94ff
parent814b5e96cafb83807ab1d6e3dacebe7fabc01cb1 (diff)
downloadtextadept-2cccb55923ef95aa657ba69f12d84610a811aa6d.tar.gz
textadept-2cccb55923ef95aa657ba69f12d84610a811aa6d.zip
More LuaDoc updates.
-rw-r--r--core/.buffer.luadoc24
-rw-r--r--doc/14_Appendix.md6
-rw-r--r--modules/textadept/editing.lua2
-rw-r--r--modules/textadept/file_types.lua10
-rw-r--r--modules/textadept/run.lua14
5 files changed, 30 insertions, 26 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 39ea2ccf..1d3b946d 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -360,17 +360,17 @@
-- * `buffer.INDIC_SQUIGGLE`
-- A squiggly underline 3 pixels in height.
-- * `buffer.INDIC_TT`
--- A line of small 'T' shapes.
+-- An underline of small 'T' shapes.
-- * `buffer.INDIC_DIAGONAL`
--- Diagonal hatching.
+-- An underline of diagonal hatches.
-- * `buffer.INDIC_STRIKE`
-- Strike out.
-- * `buffer.INDIC_HIDDEN`
-- Invisible.
-- * `buffer.INDIC_BOX`
--- A rectangle around the text.
+-- A bounding box.
-- * `buffer.INDIC_ROUNDBOX`
--- A translucent rectangle with rounded corners around the text. Use
+-- A translucent box with rounded corners around the text. Use
-- [`buffer.indic_alpha`](#indic_alpha) and
-- [`buffer.indic_outline_alpha`](#indic_outline_alpha) to set the fill and
-- outline transparency, respectively. Their default values are `30` and
@@ -1115,7 +1115,7 @@ function can_undo(buffer) end
function cancel(buffer) end
---
--- Tells the lexer to reprocess the range of text between *start_pos* and
+-- Instructs the lexer to reprocess the range of text between *start_pos* and
-- *end_pos*.
-- @param buffer The buffer.
-- @param start_pos The start position of the range of text in *buffer* to
@@ -1209,8 +1209,8 @@ function clear_registered_images(buffer) end
function clear_selections(buffer) end
---
--- Tells the lexer to style and fold the range of text between *start_pos* and
--- *end_pos*.
+-- Instructs the lexer to style and fold the range of text between *start_pos*
+-- and *end_pos*.
-- If *end_pos* is `-1`, styles and folds to the end of the buffer.
-- @param buffer The buffer.
-- @param start_pos The start position of the range of text in *buffer* to
@@ -2701,13 +2701,13 @@ function text_range(buffer, start_pos, end_pos) end
function get_lexer(buffer, current) end
---
--- Changes the buffer's lexer name to *lang* or the auto-detected language and
+-- Associates lexer name *lexer* or auto-detected lexer name with the buffer and
-- then loads the appropriate language module if the module exists.
-- @param buffer The buffer.
--- @param lang Optional string language name to set. If `nil`, attempts to
--- auto-detect the buffer's language.
--- @usage buffer.set_lexer(buffer, 'language_name')
-function set_lexer(buffer, lang) end
+-- @param lexer Optional string lexer name to set. If `nil`, attempts to
+-- auto-detect the buffer's lexer.
+-- @usage buffer.set_lexer(buffer, 'lexer_name')
+function set_lexer(buffer, lexer) end
-- Unused Fields.
-- * annotation_styles
diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md
index c7fff2d1..e128143b 100644
--- a/doc/14_Appendix.md
+++ b/doc/14_Appendix.md
@@ -118,7 +118,6 @@ non-existant graphics capabilities:
* No indicators other than `INDIC_ROUNDBOX` and `INDIC_STRAIGHTBOX`, although
neither has translucent drawing and `INDIC_ROUNDBOX` does not have rounded
corners.
-* Insert mode caret renders improperly.
* When scrolling to the right, long lines overwrite margins.
* No marker symbols other than `MARK_CHARACTER`.
* No mouse interactions, cursor types, or hotspots.
@@ -168,6 +167,7 @@ goto\_bookmark |Replaced|goto\_mark()
goto\_next |Replaced|goto\_mark(true)
goto\_prev |Replaced|goto\_mark(false)
**_M.textadept.editing** | |
+N/A |New |[INDIC\_BRACEMATCH][]
N/A |New |[INDIC\_HIGHLIGHT][]
INDIC\_HIGHLIGHT\_BACK |Removed |N/A<sup>d</sup>
autocomplete\_word(chars, default)|Changed |[autocomplete\_word][](default)
@@ -188,6 +188,7 @@ open |Changed |\_G.[io.snapopen()][]<sup>f</sup>
SC\_\* |Renamed |Removed "SC\_" prefix.
SC(FIND\|MOD\|VS\|WS) |Renamed |Removed "SC" prefix.
**buffer** | |
+check\_global() |Removed |
get\_style\_name(buffer, n) |Renamed |[style\_name][]\[n\]
reload() |Renamed |[io.reload\_file()][]
save() |Renamed |[io.save\_file()][]
@@ -195,6 +196,7 @@ save\_as() |Renamed |[io.save\_file\_as()][]
close() |Renamed |[io.close\_buffer()][]
set\_encoding() |Renamed |[io.set\_buffer\_encoding()][]
convert\_eo\_ls() |Renamed |[buffer.convert\_eols()][]
+dirty |Replaced|[buffer.modify][]
**events** | |
N/A |New |[INITIALIZED][]
handlers |Removed |N/A
@@ -231,6 +233,7 @@ close\_all() |Renamed |[close\_all\_buffers()][]
[file\_types]: api/textadept.file_types.html
[goto\_mark()]: api/textadept.bookmarks.html#goto_mark
[MARK\_BOOKMARK]: api/textadept.bookmarks.html#MARK_BOOKMARK
+[INDIC\_BRACEMATCH]: api/textadept.editing.html#INDIC_BRACEMATCH
[INDIC\_HIGHLIGHT]: api/textadept.editing.html#INDIC_HIGHLIGHT
[autocomplete\_word]: api/textadept.editing.html#autocomplete_word
[select\_enclosed()]: api/textadept.editing.html#select_enclosed
@@ -247,6 +250,7 @@ close\_all() |Renamed |[close\_all\_buffers()][]
[io.close\_buffer()]: api/io.html#close_buffer
[io.set\_buffer\_encoding()]: api/io.html#set_buffer_encoding
[buffer.convert\_eols()]: api/buffer.html#convert_eols
+[buffer.modify]: api/buffer.html#modify
[INITIALIZED]: api/events.html#INITIALIZED
[ui]: api/ui.html
[bufstatusbar\_text]: api/ui.html#bufstatusbar_text
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index b92907e8..30984d37 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -260,7 +260,7 @@ function M.autocomplete_word(words)
end
---
--- Comments or uncomments the selected lines based on the current lexer.
+-- Comments or uncomments the selected lines based on the current language.
-- As long as any part of a line is selected, the entire line is eligible for
-- commenting/uncommenting.
-- @see comment_string
diff --git a/modules/textadept/file_types.lua b/modules/textadept/file_types.lua
index ebff94c6..b1703e72 100644
--- a/modules/textadept/file_types.lua
+++ b/modules/textadept/file_types.lua
@@ -11,7 +11,7 @@ local M = {}
-- properties since the module is not loaded when Textadept starts.
-- Arguments:
--
--- * *`lexer`*: The language lexer name.
+-- * *`lexer`*: The language lexer's name.
module('textadept.file_types')]]
-- Events.
@@ -19,7 +19,7 @@ events.LEXER_LOADED = 'lexer_loaded'
---
-- Map of file extensions (excluding the leading '.') to their associated
--- lexers.
+-- lexer names.
-- If the file type is not recognized by shebang words or first-line patterns,
-- each file extension is matched against the file's extension.
-- @class table
@@ -27,7 +27,7 @@ events.LEXER_LOADED = 'lexer_loaded'
M.extensions = {--[[Actionscript]]as='actionscript',asc='actionscript',--[[Ada]]adb='ada',ads='ada',--[[ANTLR]]g='antlr',g4='antlr',--[[APDL]]ans='apdl',inp='apdl',mac='apdl',--[[Applescript]]applescript='applescript',--[[ASP]]asa='asp',asp='asp',hta='asp',--[[AWK]]awk='awk',--[[Batch]]bat='batch',cmd='batch',--[[BibTeX]]bib='bibtex',--[[Boo]]boo='boo',--[[C#]]cs='csharp',--[[C/C++]]c='cpp',cc='cpp',C='cpp',cpp='cpp',cxx='cpp',['c++']='cpp',h='cpp',hh='cpp',hpp='cpp',hxx='cpp',['h++']='cpp',--[[ChucK]]ck='chuck',--[[CMake]]cmake='cmake',['cmake.in']='cmake',ctest='cmake',['ctest.in']='cmake',--[[CoffeeScript]]coffee='coffeescript',--[[CSS]]css='css',--[[CUDA]]cu='cuda',cuh='cuda',--[[D]]d='dmd',di='dmd',--[[Desktop]]desktop='desktop',--[[diff]]diff='diff',patch='diff',--[[dot]]dot='dot',--[[Eiffel]]e='eiffel',eif='eiffel',--[[Erlang]]erl='erlang',hrl='erlang',--[[F#]]fs='fsharp',--[[Forth]]forth='forth',frt='forth',fs='forth',--[[Fortran]]f='fortran',['for']='fortran',ftn='fortran',fpp='fortran',f77='fortran',f90='fortran',f95='fortran',f03='fortran',f08='fortran',--[[Gap]]g='gap',gd='gap',gi='gap',gap='gap',--[[Gettext]]po='gettext',pot='gettext',--[[GLSL]]glslf='glsl',glslv='glsl',--[[GNUPlot]]dem='gnuplot',plt='gnuplot',--[[Go]]go='go',--[[Groovy]]groovy='groovy',gvy='groovy',--[[Gtkrc]]gtkrc='gtkrc',--[[Haskell]]hs='haskell',--[[HTML]]htm='hypertext',html='hypertext',shtm='hypertext',shtml='hypertext',xhtml='hypertext',--[[IDL]]idl='idl',odl='odl',--[[Inform]]inf='inform',ni='inform',--[[ini]]cfg='ini',cnf='ini',inf='ini',ini='ini',reg='ini',--[[Io]]io='Io',--[[Java]]bsh='java',java='java',--[[Javascript]]js='javascript',jsfl='javascript',--[[JSON]]json='json',--[[JSP]]jsp='jsp',--[[LaTeX]]bbl='latex',dtx='latex',ins='latex',ltx='latex',tex='latex',sty='latex',--[[LESS]]less='less',--[[LilyPond]]lily='lilypond',ly='lilypond',--[[Lisp]]cl='lisp',el='lisp',lisp='lisp',lsp='lisp',--[[Literate Coffeescript]]litcoffee='litcoffee',--[[Lua]]lua='lua',--[[Makefile]]GNUmakefile='makefile',iface='makefile',mak='makefile',makefile='makefile',Makefile='makefile',--[[Markdown]]md='markdown',--[[Nemerle]]n='nemerle',--[[Nimrod]]nim='nimrod',--[[NSIS]]nsh='nsis',nsi='nsis',nsis='nsis',--[[Objective C]]m='objective_c',mm='objective_c',objc='objective_c',--[[OCaml]]caml='caml',ml='caml',mli='caml',mll='caml',mly='caml',--[[Pascal]]dpk='pascal',dpr='pascal',p='pascal',pas='pascal',--[[Perl]]al='perl',perl='perl',pl='perl',pm='perl',pod='perl',--[[PHP]]inc='php',php='php',php3='php',php4='php',phtml='php',--[[Pike]]pike='pike',pmod='pike',--[[PKGBUILD]]PKGBUILD='pkgbuild',--[[Postscript]]eps='ps',ps='ps',--[[Prolog]]prolog='prolog',--[[Properties]]props='props',properties='props',--[[Python]]sc='python',py='python',pyw='python',--[[R]]R='rstats',Rout='rstats',Rhistory='rstats',Rt='rstats',['Rout.save']='rstats',['Rout.fail']='rstats',S='rstats',--[[REBOL]]r='rebol',reb='rebol',--[[Rexx]]orx='rexx',rex='rexx',--[[RHTML]]erb='rhtml',rhtml='rhtml',--[[Ruby]]Rakefile='ruby',rake='ruby',rb='ruby',rbw='ruby',--[[Sass CSS]]sass='sass',scss='sass',--[[Scala]]scala='scala',--[[Scheme]]sch='scheme',scm='scheme',--[[Shell]]bash='bash',bashrc='bash',bash_profile='bash',configure='bash',csh='bash',sh='bash',zsh='bash',--[[Smalltalk]]changes='smalltalk',st='smalltalk',sources='smalltalk',--[[SQL]]ddl='sql',sql='sql',--[[Tcl]]tcl='tcl',tk='tcl',--[[Vala]]vala='vala',--[[Verilog]]v='verilog',ver='verilog',--[[VHDL]]vh='vhdl',vhd='vhdl',vhdl='vhdl',--[[Visual Basic]]asa='vb',bas='vb',cls='vb',ctl='vb',dob='vb',dsm='vb',dsr='vb',frm='vb',pag='vb',vb='vb',vba='vb',vbs='vb',--[[XML]]dtd='xml',svg='xml',xml='xml',xsd='xml',xsl='xml',xslt='xml',xul='xml'}
---
--- Map of shebang words to their associated lexers.
+-- Map of shebang words to their associated lexer names.
-- If the file has a shebang line, a line that starts with "#!" and is the first
-- line in the file, each shebang word is matched against that line.
-- @class table
@@ -35,7 +35,7 @@ M.extensions = {--[[Actionscript]]as='actionscript',asc='actionscript',--[[Ada]]
M.shebangs = {awk='awk',lua='lua',octave='matlab',perl='perl',php='php',python='python',ruby='ruby',bash='bash',sh='bash'}
---
--- Map of first-line patterns to their associated lexers.
+-- Map of first-line patterns to their associated lexer names.
-- If a file type is not recognized by shebang words, each pattern is matched
-- against the first line in the file.
-- @class table
@@ -43,7 +43,7 @@ M.shebangs = {awk='awk',lua='lua',octave='matlab',perl='perl',php='php',python='
M.patterns = {['^%s*class%s+%S+%s*<%s*ApplicationController']='rails',['^%s*class%s+%S+%s*<%s*ActionController::Base']='rails',['^%s*class%s+%S+%s*<%s*ActiveRecord::Base']='rails',['^%s*class%s+%S+%s*<%s*ActiveRecord::Migration']='rails',['^%s*<%?xml%s']='xml'}
---
--- List of available lexers.
+-- List of available lexer names.
-- @class table
-- @name lexers
M.lexers = {}
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index 7a0d5920..632a11b5 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -23,7 +23,7 @@ local M = {}
-- this behavior, connect to the event with an index of `1` and return `true`.
-- Arguments:
--
--- * `lexer`: The lexer language name.
+-- * `lexer`: The language's lexer name.
-- * `output`: The string output from the command.
-- @field _G.events.RUN_OUTPUT (string)
-- Emitted after executing a language's run command.
@@ -31,7 +31,7 @@ local M = {}
-- behavior, connect to the event with an index of `1` and return `true`.
-- Arguments:
--
--- * `lexer`: The lexer language name.
+-- * `lexer`: The language's lexer name.
-- * `output`: The string output from the command.
module('textadept.run')]]
@@ -124,7 +124,7 @@ local function print_output(lexer, output)
end
---
--- Map of file extensions (excluding the leading '.') or lexers to their
+-- Map of file extensions (excluding the leading '.') or lexer names to their
-- associated "compile" shell command line strings or functions returning such
-- strings.
-- Command line strings may have the following macros:
@@ -138,8 +138,8 @@ end
M.compile_commands = {actionscript='mxmlc "%(filename)"',ada='gnatmake "%(filename)"',antlr='antlr4 "%(filename)"',g='antlr3 "%(filename)"',applescript='osacompile "%(filename)" -o "%(filename_noext).scpt"',boo='booc "%(filename)"',caml='ocamlc -o "%(filename_noext)" "%(filename)"',csharp=WIN32 and 'csc "%(filename)"' or 'mcs "%(filename)"',cpp='g++ -o "%(filename_noext)" "%(filename)"',c='gcc -o "%(filename_noext)" "%(filename)"',coffeescript='coffee -c "%(filename)"',context='context --nonstopmode "%(filename)"',cuda=WIN32 and 'nvcc -o "%(filename_noext).exe" "%(filename)"' or 'nvcc -o "%(filename_noext)" "%(filename)"',dmd='dmd "%(filename)"',dot='dot -Tps "%(filename)" -o "%(filename_noext).ps"',eiffel='se c "%(filename)"',erlang='erl -compile "%(filename_noext)"',fsharp=WIN32 and 'fsc.exe "%(filename)"' or 'mono fsc.exe "%(filename)"',fortran='gfortran -o "%(filename_noext)" "%(filename)"',gap='gac -o "%(filename_noext)" "%(filename)"',go='go build "%(filename)"',groovy='groovyc "%(filename)"',haskell=WIN32 and 'ghc -o "%(filename_noext).exe" "%(filename)"' or 'ghc -o "%(filename_noext)" "%(filename)"',inform=function() return 'inform -c "'..buffer.filename:match('^(.+%.inform[/\\])Source')..'"' end,java='javac "%(filename)"',latex='pdflatex -file-line-error -halt-on-error "%(filename)"',less='lessc "%(filename)" "%(filename_noext).css"',lilypond='lilypond "%(filename)"',lisp='clisp -c "%(filename)"',litcoffee='coffee -c "%(filename)"',lua='luac -o "%(filename_noext).luac" "%(filename)"',markdown='markdown "%(filename)" > "%(filename_noext).html"',nemerle='ncc "%(filename)" -out:"%(filename_noext).exe"',nimrod='nimrod c "%(filename)"',nsis='MakeNSIS "%(filename)"',objective_c='gcc -o "%(filename_noext)" "%(filename)"',pascal='fpc "%(filename)"',perl='perl -c "%(filename)"',php='php -l "%(filename)"',prolog='gplc --no-top-level "%(filename)"',python='python -m py_compile "%(filename)"',ruby='ruby -c "%(filename)"',sass='sass "%(filename)" "%(filename_noext).css"',scala='scalac "%(filename)"',tex='pdftex -file-line-error -halt-on-error "%(filename)"',vala='valac "%(filename)"',vb=WIN32 and 'vbc "%(filename)"' or 'vbnc "%(filename)"',}
---
--- Compiles the file based on its extension or lexer, using the command from the
--- `compile_commands` table.
+-- Compiles the file based on its extension or language, using the command from
+-- the `compile_commands` table.
-- Emits a `COMPILE_OUTPUT` event.
-- @see compile_commands
-- @see _G.events
@@ -148,7 +148,7 @@ function M.compile() command(M.compile_commands, true) end
events.connect(events.COMPILE_OUTPUT, print_output)
---
--- Map of file extensions (excluding the leading '.') or lexers to their
+-- Map of file extensions (excluding the leading '.') or lexer names to their
-- associated "run" shell command line strings or functions returning such
-- strings.
-- Command line strings may have the following macros:
@@ -162,7 +162,7 @@ events.connect(events.COMPILE_OUTPUT, print_output)
M.run_commands = {actionscript=WIN32 and 'start "" "%(filename_noext).swf"' or OSX and 'open "file://%(filename_noext).swf"' or 'xdg-open "%(filename_noext).swf"',ada=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',applescript='osascript "%(filename)"',awk='awk -f "%(filename)"',batch='"%(filename)"',boo='booi "%(filename)"',caml='ocamlrun "%(filename_noext)"',csharp=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',cpp=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',chuck='chuck "%(filename)"',cmake='cmake -P "%(filename)"',coffeescript='coffee "%(filename)"',context=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',cuda=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',dmd=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',eiffel="./a.out",fsharp=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',forth='gforth "%(filename)" -e bye',fortran=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',gnuplot='gnuplot "%(filename)"',go='go run "%(filename)"',groovy='groovy "%(filename)"',haskell=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',hypertext=WIN32 and 'start "" "%(filename)"' or OSX and 'open "file://%(filename)"' or 'xdg-open "%(filename)"',idl='idl -batch "%(filename)"',Io='io "%(filename)"',java='java "%(filename_noext)"',javascript='node "%(filename)"',latex=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',less='lessc --no-color "%(filename)"',lilypond=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',lisp='clisp "%(filename)"',litcoffee='coffee "%(filename)"',lua='lua -e "io.stdout:setvbuf(\'no\')" "%(filename)"',makefile=WIN32 and 'nmake -f "%(filename)"' or 'make -f "%(filename)"',markdown='markdown "%(filename)"',nemerle=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',nimrod=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',objective_c=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',pascal=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',perl='perl "%(filename)"',php='php "%(filename)"',pike='pike "%(filename)"',pkgbuild='makepkg -p "%(filename)"',prolog=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',python='python "%(filename)"',rstats=WIN32 and 'Rterm -f "%(filename)"' or 'R -f "%(filename)"',rebol='REBOL "%(filename)"',rexx=WIN32 and 'rexx "%(filename_noext)"' or 'regina "%(filename_noext)"',ruby='ruby "%(filename)"',sass='sass "%(filename)"',scala='scala "%(filename_noext)"',bash='bash "%(filename)"',csh='tcsh "%(filename)"',sh='sh "%(filename)"',zsh='zsh "%(filename)"',smalltalk='gst "%(filename)"',tcl='tclsh "%(filename)"',tex=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',vala=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',vb=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',}
---
--- Runs the file based on its extension or lexer, using the command from the
+-- Runs the file based on its extension or language, using the command from the
-- `run_commands` table.
-- Emits a `RUN_OUTPUT` event.
-- @see run_commands