From 97ea188d73d72fd9807eee7710b55bde39a6ef5a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 17 Jan 2012 20:19:15 -0500 Subject: Updated LuaDoc. --- core/._M.luadoc | 7 +++++-- core/init.lua | 6 ------ core/locale.lua | 21 ++++++++++++++++++++- 3 files changed, 25 insertions(+), 9 deletions(-) (limited to 'core') diff --git a/core/._M.luadoc b/core/._M.luadoc index 0cfd032a..04d2e938 100644 --- a/core/._M.luadoc +++ b/core/._M.luadoc @@ -2,9 +2,10 @@ -- This is a DUMMY FILE used for making LuaDoc for built-in functions in the -- global _M table. +--[[ This comment is for LuaDoc. --- -- A table of loaded modules. -module('_M') +module('_M')]] -- Markdown: -- ## Overview @@ -93,4 +94,6 @@ module('_M') --- -- This module contains no functions. -function no_functions() end no_functions = nil +-- @class function +-- @name no_functions +local no_functions diff --git a/core/init.lua b/core/init.lua index b2ec28ea..71440ca8 100644 --- a/core/init.lua +++ b/core/init.lua @@ -82,12 +82,6 @@ local _BUFFERS -- @usage _VIEWS[view] returns the index of the current view in _VIEWS. local _VIEWS ---- --- Contains all messages used by Textadept for localization. --- @class table --- @name _L -local _L - -- The functions below are Lua C functions. --- diff --git a/core/locale.lua b/core/locale.lua index ec7263c8..b59141f5 100644 --- a/core/locale.lua +++ b/core/locale.lua @@ -2,6 +2,19 @@ local M = {} +--[[ This comment is for LuaDoc. +--- +-- Table of all messages used by Textadept for localization. +module('_L')]] + +-- Markdown: +-- # Settings +-- +-- * `_NIL` [string]: String returned when no localization for a given message +-- exists. + +M._NIL = 'No Localization' + local f = io.open(_USERHOME..'/locale.conf', 'rb') if not f then f = io.open(_HOME..'/core/locale.conf', 'rb') end if not f then error('"core/locale.conf" not found.') end @@ -13,4 +26,10 @@ for line in f:lines() do end f:close() -return setmetatable(M, { __index = function() return 'No Localization' end }) +--- +-- This table contains no functions. +-- @class function +-- @name no_functions +local no_functions + +return setmetatable(M, { __index = function() return M._NIL end }) -- cgit v1.2.3