diff options
author | 2016-06-15 08:51:48 -0400 | |
---|---|---|
committer | 2016-06-15 08:51:48 -0400 | |
commit | c90910baf4f9c81711b31697aedf40d359491228 (patch) | |
tree | c16d9a1679eb35c237929ae49d0e854a984a9da9 /modules/textadept | |
parent | 7f7cff76d97afb41dc075d29d63f8bb32548f055 (diff) | |
download | textadept-c90910baf4f9c81711b31697aedf40d359491228.tar.gz textadept-c90910baf4f9c81711b31697aedf40d359491228.zip |
Do not auto-load `post_init.lua` files in language modules anymore.
Additional language module functionality should be manually loaded by the user.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/file_types.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/textadept/file_types.lua b/modules/textadept/file_types.lua index fd61e2e2..9d1f4042 100644 --- a/modules/textadept/file_types.lua +++ b/modules/textadept/file_types.lua @@ -68,11 +68,7 @@ local function set_lexer(buffer, lang) buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer) buffer:private_lexer_call(SETLEXERLANGUAGE, lang) buffer._lexer = lang - if package.searchpath(lang, package.path) then - _M[lang] = require(lang) - local post_init = lang..'.post_init' - if package.searchpath(post_init, package.path) then require(post_init) end - end + if package.searchpath(lang, package.path) then _M[lang] = require(lang) end if buffer ~= ui.command_entry then events.emit(events.LEXER_LOADED, lang) end local last_line = buffer.first_visible_line + buffer.lines_on_screen buffer:colourise(0, buffer:position_from_line(last_line + 1)) |