QScintilla/MiniEditor.py

branch
conda
changeset 6721
48c3ca1ac264
parent 6718
24a7a749e132
child 6842
c83dcb7c6147
equal deleted inserted replaced
6718:24a7a749e132 6721:48c3ca1ac264
3075 3075
3076 @param line0 first line of text to use in the generation process 3076 @param line0 first line of text to use in the generation process
3077 (string) 3077 (string)
3078 @return dummy file name to be used for binding a lexer (string) 3078 @return dummy file name to be used for binding a lexer (string)
3079 """ 3079 """
3080 bindName = self.__curFile 3080 bindName = ""
3081 line0 = line0.lower() 3081 line0 = line0.lower()
3082 3082
3083 # check first line if it does not start with #! 3083 # check first line if it does not start with #!
3084 if line0.startswith(("<html", "<!doctype html", "<?php")): 3084 if line0.startswith(("<html", "<!doctype html", "<?php")):
3085 bindName = "dummy.html" 3085 bindName = "dummy.html"
3144 elif mode in ["dmd", "d"]: 3144 elif mode in ["dmd", "d"]:
3145 bindName = "dummy.d" 3145 bindName = "dummy.d"
3146 self.filetype = "D" 3146 self.filetype = "D"
3147 3147
3148 if not bindName: 3148 if not bindName:
3149 bindName = self.fileName 3149 bindName = self.__curFile
3150 3150
3151 return bindName 3151 return bindName
3152 3152
3153 ########################################################## 3153 ##########################################################
3154 ## Methods needed for the search functionality 3154 ## Methods needed for the search functionality

eric ide

mercurial