QScintilla/Lexers/LexerTeX.py

changeset 948
fe7b94ed01ec
parent 945
8cd4d08fa9f6
child 1131
7781e396c903
equal deleted inserted replaced
946:daf90a162be4 948:fe7b94ed01ec
8 """ 8 """
9 9
10 from PyQt4.Qsci import QsciLexerTeX 10 from PyQt4.Qsci import QsciLexerTeX
11 11
12 from .Lexer import Lexer 12 from .Lexer import Lexer
13 import Preferences
13 14
14 15
15 class LexerTeX(QsciLexerTeX, Lexer): 16 class LexerTeX(QsciLexerTeX, Lexer):
16 """ 17 """
17 Subclass to implement some additional lexer dependant methods. 18 Subclass to implement some additional lexer dependant methods.
24 """ 25 """
25 QsciLexerTeX.__init__(self, parent) 26 QsciLexerTeX.__init__(self, parent)
26 Lexer.__init__(self) 27 Lexer.__init__(self)
27 28
28 self.commentString = "%" 29 self.commentString = "%"
30
31 def initProperties(self):
32 """
33 Public slot to initialize the properties.
34 """
35 try:
36 self.setFoldCompact(Preferences.getEditor("AllFoldCompact"))
37 self.setFoldComments(Preferences.getEditor("TexFoldComment"))
38 self.setProcessComments(Preferences.getEditor("TexProcessComments"))
39 self.setProcessIf(Preferences.getEditor("TexProcessIf"))
40 except AttributeError:
41 pass
29 42
30 def isCommentStyle(self, style): 43 def isCommentStyle(self, style):
31 """ 44 """
32 Public method to check, if a style is a comment style. 45 Public method to check, if a style is a comment style.
33 46

eric ide

mercurial