Skip to content

Commit

Permalink
Merge pull request #1535 from SublimeText/version4
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Stein <[email protected]>
Co-authored-by: evandrocoan <[email protected]>
Co-authored-by: david <[email protected]>
Co-authored-by: h@di <[email protected]>
  • Loading branch information
5 people authored Aug 24, 2021
2 parents 7f5a783 + 73081db commit 5309b41
Show file tree
Hide file tree
Showing 141 changed files with 3,866 additions and 6,577 deletions.
25 changes: 7 additions & 18 deletions 01_reload_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
import sys
import traceback

if sys.version_info >= (3,):
from imp import reload

_ST3 = sublime.version() >= '3000'
from imp import reload


def _load_module_exports(module):
Expand All @@ -27,28 +24,24 @@ def _load_module_exports(module):
.format(name, module.__name__))


MOD_PREFIX = ''

if _ST3:
MOD_PREFIX = 'LaTeXTools.' + MOD_PREFIX
MOD_PREFIX = 'LaTeXTools.'

# these modules must be specified in the order they depend on one another
LOAD_ORDER = [
'external.latex_chars',

'latextools_plugin_internal',

# reloaded here so that makePDF imports the current version
'parseTeXlog',

'latextools_utils',

'latextools_utils.six',

# no internal dependencies
'latextools_utils.bibformat',
'latextools_utils.settings',
'latextools_utils.utils',
'latextools_utils.tex_directives',
'latextools_utils.system',
'latextools_utils.internal_types',

# depend on previous only
Expand All @@ -73,9 +66,6 @@ def _load_module_exports(module):
'latex_fill_all'
]

if _ST3:
LOAD_ORDER.insert(1, 'latextools_plugin_internal')

# modules which should be scanned for any exports to be hoisted to this
# module's context
EXPORT_MODULES = []
Expand All @@ -86,6 +76,7 @@ def _load_module_exports(module):
]

EXPORT_MODULES += [
'latextools_utils.input_quickpanel',
'st_preview.preview_math',
'st_preview.preview_image'
]
Expand Down Expand Up @@ -128,9 +119,7 @@ def plugin_unloaded():
mod = MOD_PREFIX + module
try:
sys.modules[mod].plugin_unloaded()
except KeyError:
pass
except AttributeError:
pass


if not _ST3:
plugin_loaded()
Loading

0 comments on commit 5309b41

Please sign in to comment.