Skip to content

Commit 5309b41

Browse files
ig0774r-steinevandrocoandaviehhhadisfr
authored
Merge pull request #1535 from SublimeText/version4
Co-authored-by: Richard Stein <r-stein.github@web.de> Co-authored-by: evandrocoan <evandrocoan@hotmail.com> Co-authored-by: david <25255906+daviehh@users.noreply.github.com> Co-authored-by: h@di <hadi@hadisafari.ir>
2 parents 7f5a783 + 73081db commit 5309b41

141 files changed

Lines changed: 3866 additions & 6577 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

01_reload_submodules.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
import sys
1010
import traceback
1111

12-
if sys.version_info >= (3,):
13-
from imp import reload
14-
15-
_ST3 = sublime.version() >= '3000'
12+
from imp import reload
1613

1714

1815
def _load_module_exports(module):
@@ -27,28 +24,24 @@ def _load_module_exports(module):
2724
.format(name, module.__name__))
2825

2926

30-
MOD_PREFIX = ''
31-
32-
if _ST3:
33-
MOD_PREFIX = 'LaTeXTools.' + MOD_PREFIX
27+
MOD_PREFIX = 'LaTeXTools.'
3428

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

33+
'latextools_plugin_internal',
34+
3935
# reloaded here so that makePDF imports the current version
4036
'parseTeXlog',
4137

4238
'latextools_utils',
4339

44-
'latextools_utils.six',
45-
4640
# no internal dependencies
4741
'latextools_utils.bibformat',
4842
'latextools_utils.settings',
4943
'latextools_utils.utils',
5044
'latextools_utils.tex_directives',
51-
'latextools_utils.system',
5245
'latextools_utils.internal_types',
5346

5447
# depend on previous only
@@ -73,9 +66,6 @@ def _load_module_exports(module):
7366
'latex_fill_all'
7467
]
7568

76-
if _ST3:
77-
LOAD_ORDER.insert(1, 'latextools_plugin_internal')
78-
7969
# modules which should be scanned for any exports to be hoisted to this
8070
# module's context
8171
EXPORT_MODULES = []
@@ -86,6 +76,7 @@ def _load_module_exports(module):
8676
]
8777

8878
EXPORT_MODULES += [
79+
'latextools_utils.input_quickpanel',
8980
'st_preview.preview_math',
9081
'st_preview.preview_image'
9182
]
@@ -128,9 +119,7 @@ def plugin_unloaded():
128119
mod = MOD_PREFIX + module
129120
try:
130121
sys.modules[mod].plugin_unloaded()
122+
except KeyError:
123+
pass
131124
except AttributeError:
132125
pass
133-
134-
135-
if not _ST3:
136-
plugin_loaded()

0 commit comments

Comments
 (0)