aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/adeptsense.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-08-26 22:36:10 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-08-26 22:36:10 -0400
commit92a1e1cae3029a3c4dde56c8dcc5d212fdc11e26 (patch)
tree53d4645ebc30698f4a782bc76232b0b54fe82507 /modules/textadept/adeptsense.lua
parentacda712a50dbebafa295ccd07ce8186d9b82aa10 (diff)
downloadtextadept-92a1e1cae3029a3c4dde56c8dcc5d212fdc11e26.tar.gz
textadept-92a1e1cae3029a3c4dde56c8dcc5d212fdc11e26.zip
Renamed `_M.textadept` to `textadept`; `_M` is for language modules only now.
Diffstat (limited to 'modules/textadept/adeptsense.lua')
-rw-r--r--modules/textadept/adeptsense.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index dd98c052..8f4bdacd 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -46,7 +46,7 @@ local M = {}
-- Creating a new instance of an Adeptsense from within a language module is
-- easy. Just replace the '?' with the name of your language:
--
--- M.sense = _M.textadept.adeptsense.new('?')
+-- M.sense = textadept.adeptsense.new('?')
--
-- ### Terminology
--
@@ -89,7 +89,7 @@ local M = {}
-- M.sense.syntax.type_declarations = {}
-- M.sense.syntax.type_assignments = {
-- ['^[\'"]'] = 'string', -- foo = 'bar' or foo = "bar"
--- ['^([%w_%.]+)%s*$'] = '%1', -- foo = _M.textadept.adeptsense
+-- ['^([%w_%.]+)%s*$'] = '%1', -- foo = textadept.adeptsense
-- ['^io%.p?open%s*%b()%s*$'] = 'file' -- f = io.open('foo')
-- }
--
@@ -142,7 +142,7 @@ local M = {}
--
-- **C/C++**
--
--- local as = _M.textadept.adeptsense
+-- local as = textadept.adeptsense
-- M.sense.ctags_kinds = {
-- c = as.CLASS, d = as.FUNCTION, e = as.FIELD, f = as.FUNCTION,
-- g = as.CLASS, m = as.FIELD, s = as.CLASS, t = as.CLASS
@@ -157,10 +157,10 @@ local M = {}
-- table keys as `'t'`.
--
-- M.sense.ctags_kinds = {
--- f = _M.textadept.adeptsense.FUNCTION,
--- F = _M.textadept.adeptsense.FIELD,
--- m = _M.textadept.adeptsense.CLASS,
--- t = _M.textadept.adeptsense.FIELD,
+-- f = textadept.adeptsense.FUNCTION,
+-- F = textadept.adeptsense.FIELD,
+-- m = textadept.adeptsense.CLASS,
+-- t = textadept.adeptsense.FIELD,
-- }
-- M.sense:load_ctags(_HOME..'/modules/lua/tags', true)
--
@@ -382,7 +382,7 @@ local M = {}
-- Ctags kind for Adeptsense functions.
-- @field FIELD (string)
-- Ctags kind for Adeptsense fields.
-module('_M.textadept.adeptsense')]]
+module('textadept.adeptsense')]]
local senses = {}
@@ -831,7 +831,7 @@ function M.goto_ctag(sense, kind, title)
buffer:goto_pos(buffer.target_start)
end
else
- _M.textadept.editing.goto_line(tonumber(line))
+ textadept.editing.goto_line(tonumber(line))
end
end
@@ -874,7 +874,7 @@ function M.handle_clear(sense) end
-- Only one sense can exist per language.
-- @param lang The lexer language name to create an Adeptsense for.
-- @return adeptsense
--- @usage local lua_sense = _M.textadept.adeptsense.new('lua')
+-- @usage local lua_sense = textadept.adeptsense.new('lua')
-- @name new
function M.new(lang)
local sense = senses[lang]
@@ -899,13 +899,13 @@ function M.new(lang)
-- simply containers for functions and fields so Lua modules would count as
-- classes. Any other kinds will be passed to `handle_ctag()` for user-defined
-- handling.
--- @usage luasense.ctags_kinds = {f = _M.textadept.adeptsense.FUNCTION}
--- @usage csense.ctags_kinds = {m = _M.textadept.adeptsense.FIELD,
--- f = _M.textadept.adeptsense.FUNCTION, c = _M.textadept.adeptsense.CLASS,
--- s = _M.textadept.adeptsense.CLASS}
--- @usage javasense.ctags_kinds = {f = _M.textadept.adeptsense.FIELD,
--- m = _M.textadept.adeptsense.FUNCTION, c = _M.textadept.adeptsense.CLASS,
--- i = _M.textadept.adeptsense.CLASS}
+-- @usage luasense.ctags_kinds = {f = textadept.adeptsense.FUNCTION}
+-- @usage csense.ctags_kinds = {m = textadept.adeptsense.FIELD,
+-- f = textadept.adeptsense.FUNCTION, c = textadept.adeptsense.CLASS,
+-- s = textadept.adeptsense.CLASS}
+-- @usage javasense.ctags_kinds = {f = textadept.adeptsense.FIELD,
+-- m = textadept.adeptsense.FUNCTION, c = textadept.adeptsense.CLASS,
+-- i = textadept.adeptsense.CLASS}
-- @class table
-- @name ctags_kinds
-- @see handle_ctag