diff options
Diffstat (limited to 'Master/texmf/scripts/texdoc/alias.tlu')
-rw-r--r-- | Master/texmf/scripts/texdoc/alias.tlu | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/Master/texmf/scripts/texdoc/alias.tlu b/Master/texmf/scripts/texdoc/alias.tlu index a99a8b51058..1ae150b5b1c 100644 --- a/Master/texmf/scripts/texdoc/alias.tlu +++ b/Master/texmf/scripts/texdoc/alias.tlu @@ -1,15 +1,6 @@ --- configuration handling for texdoc ---[[ -Copyright 2008, 2009 Manuel Pégourié-Gonnard -Distributed under the terms of the GNU GPL version 3 or later. -See texdoc.tlu for details. ---]] - --- Load a private environment for this submodule (see texdoc.tlu). -local L = {} -load_env(L, { - 'config', -}) +-- alias.tlu: configuration handling for texdoc +-- +-- Manuel Pégourié-Gonnard, GPLv3, see texdoclib.tlu for details --[[ structure of the alias table @@ -53,7 +44,7 @@ function add_alias(key, value, score) table.insert(alias[k], make_alias(value, score)) end --- prevent a key from begin further aliased +-- prevent a key from being further aliased function stop_alias(key) local k = string.lower(key) alias[k] = alias[k] or {} @@ -65,8 +56,7 @@ function get_patterns(name, no_alias) local n = string.lower(name) -- get normal aliases local res - if config.mode ~= 'regex' and config.alias_switch - and not no_alias and alias[n] then + if alias[n] and not no_alias then res = alias[n] else res = { make_alias(name, false) } @@ -119,9 +109,8 @@ function aliased_names() end end --- finally export a few symbols -export_symbols(L, { - 'confline_to_alias', - 'get_patterns', - 'aliased_names', -}) +return { + confline_to_alias = confline_to_alias, + get_patterns = get_patterns, + aliased_names = aliased_names, +} |